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 A330406 #30 Jan 16 2020 13:20:51 %S A330406 2,2,3,2,2,3,2,2,5,3,5,2,2,3,3,2,2,2,2,5,2,2,3,7,3,2,2,3,2,5,2,5,2,3, %T A330406 2,2,2,3,7,2,5,3,5,2,2,3,2,2,3,5,3,7,2,3,3,2,2,5,2,2,2,2,2,3,7,2,2,3, %U A330406 2,2,2,3,2,3,3,5,2,3,3,2,11,2,2,5,3,2,2,2,3,2,2,11,5,2,3,11,2,3,2,2,7,2,3,5,2,7,3,2,2 %N A330406 a(n) is the smallest prime q such that q^((p-1)/2) == -1 (mod p), where p = A002144(n) is the n-th prime congruent to 1 mod 4. %C A330406 Subset of A053760 corresponding to p == 1 (mod 4). %C A330406 A002144(n) = p is a sum of two integer squares (Fermat): p = a^2 + b^2. To find a and b, calculate gcd(p, A330406(n)^((p-1)/4)+i) = a + bi in the Gaussian integers. %e A330406 Let p = A002144(30)= 313. Then (p-1)/2 = 156. Now 2^156 == 3^156 == 1 (mod p) but 5^156 == -1 (mod p). Thus A330406(30)=5. %t A330406 Map[Block[{q = 2}, While[PowerMod[q, (# - 1)/2, #] != # - 1, q = NextPrime@ q]; q] &, Select[4 Range[350] + 1, PrimeQ]] (* _Michael De Vlieger_, Dec 29 2019 *) %o A330406 (PARI) A002144 = select(p->p%4==1, primes(2200)); %o A330406 A330406 = vector(1000); for(i=1, 1000, my(p=A002144[i]); forprime(j=1, 20, my(x=Mod(j, p)^((p-1)/2)); if(x+1, , A330406[i]=j; break))) %o A330406 A330406 %Y A330406 Cf. A002144, A053760. %K A330406 nonn %O A330406 1,1 %A A330406 _Nicholas C. Singer_, Dec 13 2019