This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A376999 #18 Oct 20 2024 13:45:21 %S A376999 0,5,2,38,17,83,362,167,227,2273,398,5297,64382,69467,116387,238262, %T A376999 214037,430022,5472953,9481097,8062073,41941577,86374763,312521282 %N A376999 a(n) is the least number k that is a quadratic residue modulo prime(n) but is a quadratic nonresidue modulo all previous odd primes. %e A376999 a(5) = 38 because 38 is a quadratic residue modulo prime(5) = 11 but is not a quadratic residue modulo the previous odd primes 3, 5 and 7, and no number smaller than 38 works. %p A376999 f:= proc(n) local k,p; %p A376999 p:= 2; %p A376999 for k from 2 do %p A376999 p:= nextprime(p); %p A376999 if numtheory:-quadres(n,p) = 1 then return k fi %p A376999 od %p A376999 end proc: %p A376999 V:= Array(2..25): count:= 0: %p A376999 for k from 2 while count < 24 do %p A376999 v:= f(k); %p A376999 if v > 0 and v <= 25 and V[v] = 0 then %p A376999 V[v]:= k; count:= count+1; %p A376999 fi; %p A376999 od: %p A376999 V[2]:= 0: %p A376999 convert(V,list); %Y A376999 Cf. A377212. %K A376999 nonn %O A376999 2,2 %A A376999 _Robert Israel_, Oct 20 2024