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 A374155 #13 Jun 29 2024 11:22:00 %S A374155 2,3,5,2,3,3,2,5,2,5,2,3,2,11,2,7,3,3,17,2,2,2,3,2,2,5,2,3,3,2,2,3,2, %T A374155 5,5,2,3,41,2,13,3,3,2,2,7,2,5,2,3,3,2,2,2,3,2,2,5,2,3,2,7,17,7,2,2,7, %U A374155 5,2,3,3,2,2,2,3,5,2,5,3,2,2,3,3,2,2,2 %N A374155 a(n) is the least prime that is a quadratic residue modulo prime(n). First column of A373751. %e A374155 a(38) = 41 because row 38 of A373751 starts 41, 43, 47, ..., which are the primes that are quadratic residues modulo 163. %p A374155 a := proc(n) local a, p; a := 1; p := ithprime(n); while true do a := a + 1; %p A374155 if NumberTheory:-QuadraticResidue(a, p) = 1 and isprime(a) then return a fi od end: seq(a(n), n = 1..85); %o A374155 (PARI) a(n) = my(p=prime(n), q=2); while (!issquare(Mod(q, p)), q=nextprime(q+1)); q; \\ _Michel Marcus_, Jun 29 2024 %Y A374155 Variant: A306530 (differs in the first 3 values). %Y A374155 Cf. A373751. %K A374155 nonn %O A374155 1,1 %A A374155 _Peter Luschny_, Jun 29 2024