2018-09-30 22:01:58 +00:00
---
id: 5900f4791000cf542c50ff8c
title: 'Problem 269: Polynomials with at least one integer root'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301918
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-10-08 00:01:53 +00:00
A root or zero of a polynomial P(x) is a solution to the equation P(x) = 0.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Define Pn as the polynomial whose coefficients are the digits of n.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
For example, P5703(x) = 5x3 + 7x2 + 3.
2020-11-27 18:02:05 +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.
2018-09-30 22:01:58 +00:00
It can be verified that Z(100 000) is 14696.
What is Z(1016)?
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler269()` should return 1311109198529286.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler269(), 1311109198529286);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler269() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler269();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```