A147971 Indices of the records in the sequence of smallest positive quadratic nonresidues (A053760).
1, 4, 9, 20, 64, 92, 246, 752, 1289, 2084, 3383, 31284, 271259, 618525, 1389315, 2228197, 2914847, 6857528, 7457772, 141236709, 366883983, 1034128714, 3690981956, 4965932454, 7863515482, 19824941433, 195348751601, 292557888940, 2296552237422
Offset: 1
Keywords
Formula
Extensions
a(20)-a(29) from Charles R Greathouse IV, Apr 06 2012
A147969 Smallest prime p modulo which numbers 1,2,...,n are quadratic residues.
2, 7, 23, 23, 71, 71, 311, 311, 311, 311, 479, 479, 1559, 1559, 1559, 1559, 5711, 5711, 10559, 10559, 10559, 10559, 18191, 18191, 18191, 18191, 18191, 18191, 31391, 31391, 366791, 366791, 366791, 366791, 366791, 366791, 366791, 366791, 366791
Offset: 1
Keywords
Comments
The same primes without repetitions are listed in A147970.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..100
Programs
-
PARI
a(n)=forprime(p=2,default(primelimit),forprime(i=2,n, if(kronecker(i,p)<1,next(2)));return(p)) \\ Charles R Greathouse IV, Apr 06 2012
A147972 Smallest prime p modulo which the first n primes are nonzero quadratic residues.
7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 366791, 366791, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 120293879, 120293879, 131486759, 131486759, 2929911599, 2929911599, 7979490791, 23616331489, 23616331489, 89206899239, 121560956039, 196265095009, 196265095009, 513928659191, 5528920734431, 8402847753431, 8402847753431, 8402847753431, 70864718555231
Offset: 1
Keywords
Comments
Crossrefs
Programs
-
Mathematica
(*version 7.0*)m=1;P=7;Lst={p};While[m<25,m++;S=Prime[Range[m]];While[MemberQ[JacobiSymbol[S,p],-1],p=NextPrime[p]];Lst=Append[Lst,P]];Lst (* Emmanuel Vantieghem, Jan 31 2012 *)
-
PARI
t=2;forprime(p=2,1e9,forprime(q=2,t,if(kronecker(q,p)<1,next(2)));print1(p", ");t=nextprime(t+1);p--) \\ Charles R Greathouse IV, Jan 31 2012
Formula
Extensions
a(23)-a(25) from Emmanuel Vantieghem, Jan 31 2012
a(26)-a(37) from Max Alekseyev, Aug 21 2015
Comments