login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242830 For p = prime(n), a(n) = number of bases 1 < b < p such that b^(p-1) == 1 (mod p^2). 13

%I #36 Jan 27 2023 19:11:32

%S 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 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 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 For p = prime(n), a(n) = number of bases 1 < b < p such that b^(p-1) == 1 (mod p^2).

%C a(n) > 0 if and only if p is in A134307.

%H Robert Israel, <a href="/A242830/b242830.txt">Table of n, a(n) for n = 1..10000</a>

%p A242830:= proc(n) local p;

%p p:= ithprime(n);

%p numboccur(1,[seq(b &^ (p-1) mod p^2, b=2..p-1)]);

%p end proc;

%p seq(A242830(n),n=1..1000); # _Robert Israel_, Jul 16 2014

%t a[n_] := With[{p = Prime[n]}, Length@Select[Range[2, p-1], PowerMod[#, p-1, p^2] == 1&]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 27 2023 *)

%o (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 Cf. A001220, A039678, A134307, A185103, A244249.

%K nonn

%O 1,5

%A _Felix Fröhlich_, Jul 12 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:57 EDT 2024. Contains 371905 sequences. (Running on oeis4.)