This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A242830 #36 Jan 27 2023 19:11:32 %S A242830 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, %T A242830 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, %U A242830 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 %N A242830 For p = prime(n), a(n) = number of bases 1 < b < p such that b^(p-1) == 1 (mod p^2). %C A242830 a(n) > 0 if and only if p is in A134307. %H A242830 Robert Israel, <a href="/A242830/b242830.txt">Table of n, a(n) for n = 1..10000</a> %p A242830 A242830:= proc(n) local p; %p A242830 p:= ithprime(n); %p A242830 numboccur(1,[seq(b &^ (p-1) mod p^2, b=2..p-1)]); %p A242830 end proc; %p A242830 seq(A242830(n),n=1..1000); # _Robert Israel_, Jul 16 2014 %t A242830 a[n_] := With[{p = Prime[n]}, Length@Select[Range[2, p-1], PowerMod[#, p-1, p^2] == 1&]]; %t A242830 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 27 2023 *) %o A242830 (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) %Y A242830 Cf. A001220, A039678, A134307, A185103, A244249. %K A242830 nonn %O A242830 1,5 %A A242830 _Felix Fröhlich_, Jul 12 2014