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 A249797 #21 Oct 02 2017 02:12:21 %S A249797 2,3,5,7,13,67,41,71,19,97,199,263,311,7121,3221,8581,373,977,331, %T A249797 1723,2161,27409,19079,42967,61441,206051,16649,212777,236527,572651, %U A249797 175897,258521,1010291,1369559,2530067 %N A249797 a(1) = 2; thereafter, a(n) is the smallest prime not yet used which is compatible with the condition that a(n) is a non-quadratic residue modulo a(k) for the next n indices k = n + 1, n + 2, ..., 2n. %C A249797 L(a(n)/a(k)) = -1 for the next n indices k = n + 1, n + 2, ..., 2n where L(a/p) is the Legendre symbol. %e A249797 a(1) = 2 because the next term is 3 and L(2/3) = -1; %e A249797 a(2) = 3 because the next two terms are (5, 7) => L(3/5) = -1 and L(3/7) = -1; %e A249797 a(3) = 5 because the next three terms are (7, 13, 67) => L(5/7) = -1, L(5/13) = -1 and L(5/67) = -1. %o A249797 (PARI) m=35; v=vector(m); u=vectorsmall(10000*m); for(n=1, m, for(i=1, 10^9, if(!u[i], for(j=(n+1)\2, n-1, if(kronecker(v[j], prime(i))==1 || kronecker(v[j],prime(i))==0, next(2))); v[n]=prime(i); u[i]=1; break))); v %Y A249797 Cf. A249782. %K A249797 nonn,more %O A249797 1,1 %A A249797 _Michel Lagneau_, Nov 06 2014