OFFSET
1,1
COMMENTS
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.
EXAMPLE
a(1) = 2 because the next term is 7 and L(2/7) = 1;
a(2) = 7 because the next two terms are (3,37) => L(7/3) = 1 and L(7/37) = 1;
a(3) = 3 because the next three terms are (37,11,83) => L(3/37) = 1, L(3/11) = 1 and L(3/83) = 1.
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Lagneau, Nov 05 2014
STATUS
approved