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!)
A257302 Number of 4th power nonresidues modulo n. 3

%I #10 Apr 24 2015 18:29:22

%S 0,0,1,2,3,2,3,6,5,6,5,8,9,6,11,14,12,10,9,16,13,10,11,20,19,18,17,20,

%T 21,22,15,28,21,24,27,28,27,18,31,36,30,26,21,32,37,22,23,44,27,38,41,

%U 44,39,34,43,48,37,42,29,52,45,30,47,58,57,42,33,58

%N Number of 4th power nonresidues modulo n.

%C a(n) is the number of values r, 0<=r<n, such that, for p=4 and for any m>=0, (m^p)%n != r.

%H Stanislav Sykora, <a href="/A257302/b257302.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = n - A052273(n).

%F Satisfies a(n) <= n-2 (residues 0 and 1 are always present).

%t Table[Length[Complement[Range[n - 1], Union[Mod[Range[n]^4, n]]]], {n, 100}] (* _Vincenzo Librandi_, Apr 20 2015 *)

%o (PARI) nrespowp(n,p) = {my(v=vector(n),d=0);

%o for(r=0,n-1,v[1+(r^p)%n]+=1);

%o for(k=1,n,if(v[k]==0,d++));

%o return(d);}

%o a(n) = nrespowp(n,4)

%Y Cf. A095972 (p=2), A257301 (p=3), A257303 (p=5).

%K nonn

%O 1,4

%A _Stanislav Sykora_, Apr 19 2015

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 24 12:46 EDT 2024. Contains 371942 sequences. (Running on oeis4.)