A320535 Number of solutions to (x+1)^p - x^p == 1 (mod p^2) in the range 1 <= x <= p - 2, p = prime(n).
0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 12, 2, 2, 0, 2, 8, 6, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 6, 2, 0, 8, 0, 2, 2, 2, 6, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 8, 0, 2, 0, 0, 2, 2, 2, 0, 0, 2, 0, 2, 6, 8, 0, 2, 2, 6, 0
Offset: 1
Keywords
Examples
The nontrivial solutions to (x+1)^7 - x^7 == 1 (mod 49) are x == 2, 4 (mod 7); the solutions to x^6 == (x+1)^6 == 1 (mod 49) are x == 18, 30 (mod 49), so a(4) = 2.
Links
- Robert Israel, Table of n, a(n) for n = 1..2500
Programs
-
Maple
f:= proc(n) local p; p:= ithprime(n); nops(select(t -> (t+1)^p - t^p mod p^2 = 1, [$1 .. p - 2])) end proc: map(f, [$1..100]); # Robert Israel, Mar 18 2024
-
PARI
a(n) = my(p=prime(n)); sum(x=1, p-2, Mod(x+1, p^2)^p-Mod(x, p^2)^p==1);
Extensions
Name corrected by Robert Israel, Mar 18 2024
Comments