Higher powers of 5
The cycle is P(n) mod 5. What happens modulo 25, 125, 625? The papers leave this open. This page computes it: every modulus keeps a mirror, the period grows by a factor of 5 each time, and the number of zeros follows a simple rule.
Each cell is one n, coloured by P(n) mod m (grey = 0). Zoom in with the slider, drag to move around, hover to read a value. The image download contains all the rows shown, at full resolution.
Measured
Proved
Period and mirror. For m = 5j: P(n + 5j+1) − P(n) = 2n·5j + 52j+1, which is divisible by 5j, so 5j+1 is a period; and P(−n) = P(n), so each period is a mirror image of itself. (Minimality is checked by computer.)
Zeros: 5⌈j/2⌉ + 4 per period. P(n) ≡ 0 (mod 5j) means n² + 4n5 ≡ 0 (mod 5j+1). For n = 5t this is 5t² ≡ 0 (mod 5j), true for exactly 5⌈j/2⌉ values of t in a period. Otherwise it reads n² ≡ 4 or n² ≡ −4 (mod 5j+1); each has exactly two solutions (they lift uniquely from n ≡ ±2 and n ≡ ±1 mod 5), and those solutions automatically have the right sign of n5. Total: 5⌈j/2⌉ + 4, giving 9, 9, 29, 29, 129, 129, …
All the moduli at a glance
Zeros: the number of n in one period with P(n) ≡ 0. For m = 5j the counts 9, 9, 29, 29, 129 follow one rule, proved below.