P269
projecteuler.net

Polynomials with at Least One Integer Root

ℹ️Published on Saturday, 19th December 2009, 09:00 am; Solved by 790;
Difficulty rating: 80%

A root or zero of a polynomial $P(x)$ is a solution to the equation $P(x) = 0$.
Define $P_n$ as the polynomial whose coefficients are the digits of $n$.
For example, $P_{5703}(x) = 5x^3 + 7x^2 + 3$.

We can see that:

  • $P_n(0)$ is the last digit of $n$,
  • $P_n(1)$ is the sum of the digits of $n$,
  • $P_n(10)$ is $n$ itself.

Define $Z(k)$ as the number of positive integers, $n$, not exceeding $k$ for which the polynomial $P_n$ has at least one integer root.

It can be verified that $Z(100\,000)$ is $14696$.

What is $Z(10^{16})$?



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.