Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Aug 05 2019 02:48:29
%S 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,
%T 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,
%U 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
%N 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.
%C Conjecture: a(n) > 0 for all n > 3.
%C Note that 2^3 + 1 = 3^2 is a quadratic residue modulo any prime p > 3. Also, there is no prime p < prime(316) = 2089 with 2^p + 1 a primitive root modulo 2089.
%C See also A234972 and A235709 for similar conjectures.
%H Zhi-Wei Sun, <a href="/A235712/b235712.txt">Table of n, a(n) for n = 1..10000</a>
%H Z.-W. Sun, <a href="http://arxiv.org/abs/1405.0290">New observations on primitive roots modulo primes</a>, arXiv preprint arXiv:1405.0290 [math.NT], 2014.
%e a(4) = 2 since 2^2 + 1 = 5 is a quadratic nonresidue modulo prime(4) = 7.
%t Do[Do[If[JacobiSymbol[2^(Prime[k])+1,Prime[n]]==-1,Print[n," ",Prime[k]];Goto[aa]],{k,1,n-1}];
%t Print[n," ",0];Label[aa];Continue,{n,1,100}]
%Y Cf. A000040, A098640, A234972, A235709.
%K nonn
%O 1,2
%A _Zhi-Wei Sun_, Apr 20 2014