Consider a polynomial in a field $F$ which is a finite field on a prime $p$. Consider a polynomial $$a_0+a_1x+a_2x^2+a_3x^3....a_{n-1}x^{n-1}$$ The polynomial has a special property that all $a_0,a_1...a_{n-1}\in\{0,1,p-1\}$ with at least one of the coefficients being non zero, with $p \geq 4n$.
Find the probability that a number $k \leq n $ chosen uniformly in the range is a solution to this equation.
The answer given is $\frac{n-1}{4n}$, since $k$ is chosen uniformly and it can have at most $n-1$ roots.
I just don't understand anything about the solution.
If you let $a_0$ run through all the numbers from $0$ to $p-1$, then each $k$ is a root once. So I would say the chance is $1/p$.
The exception is when $a_1,...,a_{n-1}$ are all zero, in which case $a_0=0$ is not allowed. So a better answer would be $(p^{n-1}-1)/(p^n-1)$.