OFFSET
2,16
LINKS
Felix Fröhlich, Table of n, a(n) for n = 2..9999
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
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Mar 11 2015
STATUS
approved