A235712 Least prime p < prime(n) with 2^p + 1 a quadratic nonresidue modulo prime(n), or 0 if such a prime p does not exist.
0, 2, 0, 2, 7, 2, 2, 5, 2, 11, 11, 2, 7, 2, 2, 2, 5, 5, 2, 5, 2, 5, 2, 5, 2, 7, 2, 2, 5, 2, 2, 13, 2, 5, 13, 5, 2, 2, 2, 2, 5, 11, 5, 2, 2, 7, 5, 2, 2, 23, 2, 7, 5, 5, 2, 2, 5, 5, 2, 7, 2, 2, 2, 5, 2, 2, 7, 2, 2, 5, 2, 7, 2, 2, 11, 2, 5, 2, 5, 5, 5, 7, 7, 2, 5, 2, 5, 2, 7, 2, 2, 7, 2, 13, 7, 2, 5, 5, 2, 5
Offset: 1
Keywords
Examples
a(4) = 2 since 2^2 + 1 = 5 is a quadratic nonresidue modulo prime(4) = 7.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Z.-W. Sun, New observations on primitive roots modulo primes, arXiv preprint arXiv:1405.0290 [math.NT], 2014.
Programs
-
Mathematica
Do[Do[If[JacobiSymbol[2^(Prime[k])+1,Prime[n]]==-1,Print[n," ",Prime[k]];Goto[aa]],{k,1,n-1}]; Print[n," ",0];Label[aa];Continue,{n,1,100}]
Comments