A088201 Distance p_n-LQnR(p_n) (A088198) where the difference sequence (A088197) of LQnR(p_n) (A088196) is <= 0.
5, 5, 7, 5, 5, 7, 5, 11, 5, 11, 7, 7, 7, 5, 7, 5, 5, 13, 5, 7, 11, 7, 7, 11, 13, 5, 7, 11, 7, 5, 11, 7, 7, 5, 7, 7, 7, 13, 7, 7, 11, 7, 5, 5, 11, 7, 7, 7, 13, 13, 17, 5, 11, 11, 17, 11, 7, 7, 13, 5, 7, 7, 13, 7, 5, 7, 7, 5, 5, 13, 5, 7, 11, 13, 7, 7, 17, 11, 5, 7, 11, 11, 7, 11, 7, 7, 5, 7
Offset: 1
Keywords
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes.
Programs
-
PARI
qnrp_pm_nm(n)= {/* The distance of p from LQnR where the sequence of the largest QnR modulo the primes is nonmonotonic */ local(k=1,m,p,fl,jj,j,v=[]); for(i=2,n,m=0; p=prime(i); jj=0; fl=2^p-1; j=2; while((j<=(p-1)/2),jj=(j^2)%p; fl-=2^jj; j++); j=p-1; while(m==0,if(bitand(2^j,fl),m=j); j--); if(m-k<=0,v=concat(v,p-m)); k=m); print(v)}
Comments