login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242830
For p = prime(n), a(n) = number of bases 1 < b < p such that b^(p-1) == 1 (mod p^2).
13
0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 0, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 0, 1, 1, 3, 0, 0, 1, 1, 1, 1, 0, 2, 0, 3, 0, 2, 2, 2, 2, 2, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 0, 4, 0, 1
OFFSET
1,5
COMMENTS
a(n) > 0 if and only if p is in A134307.
LINKS
MAPLE
A242830:= proc(n) local p;
p:= ithprime(n);
numboccur(1, [seq(b &^ (p-1) mod p^2, b=2..p-1)]);
end proc;
seq(A242830(n), n=1..1000); # Robert Israel, Jul 16 2014
MATHEMATICA
a[n_] := With[{p = Prime[n]}, Length@Select[Range[2, p-1], PowerMod[#, p-1, p^2] == 1&]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 27 2023 *)
PROG
(PARI) i=0; forprime(p=2, 10^3, a=2; while(a<p, if(Mod(a, p^2)^(p-1)==1, i++); a++); print1(i, ", "); i=0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jul 12 2014
STATUS
approved