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 #11 Apr 18 2023 08:29:15
%S 3,5,3,5,3,7,3,11,3,5,3,7,3,7,3,5,3,3,7,5,3,5,13,3,3,11,3,5,3,7,3,3,
%T 13,5,5,3,3,3,7,5,5,3,5,3,7,3,7,5,3,5,3,5,3,5,3,3,3,11,11,5,3,13,5,3,
%U 17,3,7,5,3,3,7,11,7,3,3,5,3,3,3,7,5,3,3,3,11,3,13,5,3,3,7,3,3,11,5,3,3,5,3
%N Let p = n-th prime == 5 (mod 8) (A007521); a(n) = smallest prime q such that p is not a square mod q.
%H Robert Israel, <a href="/A096634/b096634.txt">Table of n, a(n) for n = 1..10000</a>
%p g:= proc(n) local p;
%p p:= 1;
%p do
%p p:= nextprime(p);
%p if numtheory:-quadres(n,p) = -1 then return p fi
%p od
%p end proc:
%p map(g, select(isprime, [seq(i,i=5..10000,8)])); # _Robert Israel_, Apr 17 2023
%t f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; f /@ Select[ Prime[ Range[435]], Mod[ #, 8] == 5 &]
%Y Cf. A094928, A096633, A096635, A096638.
%K nonn
%O 1,1
%A _Robert G. Wilson v_, Jun 24 2004