login
A255920
Number of primes p with p < n such that n^(p-1) == 1 (mod p^2) i.e., number of Wieferich primes to base n less than n.
14
0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 2, 2, 3, 0, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 0, 1, 0, 2, 1, 0, 2, 2, 1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 0, 3, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 2, 0, 2, 3, 2, 1, 2, 0, 2, 1, 2, 2, 1, 1, 1, 3, 2, 2, 0, 0, 1, 0, 0, 0
OFFSET
2,16
LINKS
MATHEMATICA
f[n_] := Block[{p = Complement[Prime@ Range@ PrimePi@ n, First /@ FactorInteger@ n]}, Select[p, Divisible[n^(# - 1) - 1, #^2] &]]; Length /@ Table[f@ n, {n, 2, 120}] (* Michael De Vlieger, Sep 24 2015 *)
PROG
(PARI) for(n=2, 120, i=0; forprime(p=1, n, if(Mod(n, p^2)^(p-1)==1, i++)); print1(i, ", "))
CROSSREFS
Cf. A242830.
Sequence in context: A187096 A340146 A340143 * A160115 A139365 A071479
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Mar 11 2015
STATUS
approved