2018-10-10 22:03:03 +00:00
---
id: 5900f4791000cf542c50ff8c
2021-02-06 04:42:36 +00:00
title: 'Problem 269: Polynomials with at least one integer root'
2018-10-10 22:03:03 +00:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 301918
2021-01-13 02:31:00 +00:00
dashedName: problem-269-polynomials-with-at-least-one-integer-root
2018-10-10 22:03:03 +00:00
---
2020-12-16 07:37:30 +00:00
# --description--
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
A root or zero of a polynomial P(x) is a solution to the equation P(x) = 0.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
Define Pn as the polynomial whose coefficients are the digits of n.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
For example, P5703(x) = 5x3 + 7x2 + 3.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
We can see that:Pn(0) is the last digit of n, Pn(1) is the sum of the digits of n, Pn(10) is n itself.Define Z(k) as the number of positive integers, n, not exceeding k for which the polynomial Pn has at least one integer root.
It can be verified that Z(100 000) is 14696.
What is Z(1016)?
2018-10-10 22:03:03 +00:00
2020-12-16 07:37:30 +00:00
# --hints--
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
`euler269()` should return 1311109198529286.
2018-10-10 22:03:03 +00:00
```js
2020-12-16 07:37:30 +00:00
assert.strictEqual(euler269(), 1311109198529286);
2018-10-10 22:03:03 +00:00
```
2021-01-13 02:31:00 +00:00
# --seed--
## --seed-contents--
```js
function euler269() {
return true;
}
euler269();
```
2020-12-16 07:37:30 +00:00
# --solutions--
2020-08-13 15:24:35 +00:00
2021-01-13 02:31:00 +00:00
```js
// solution required
```