OFFSET
1,1
COMMENTS
Kronecker(i,j) is an extension of the Jacobi symbol to all integers. The sequence with the condition Kronecker(a(k), a(n)) = -1/+1 is given by A247665.
EXAMPLE
a(1) = 2 because the next term is 3 and k(2,3) = -1;
a(2) = 3 because the next two terms are (5,7) => k(3,5) = -1 and k(3,7) = -1;
a(3) = 5 because the next three terms are (7,13,33) => k(5,7) = -1, k(5,13) = -1 and k(5,33) = -1.
PROG
(PARI) m=33; v=vector(m); u=vectorsmall(25000*m); for(n=1, m, for(i=2, 10^9, if(!u[i], for(j=(n+1)\2, n-1, if(kronecker(v[j], i)==1 || kronecker(v[j], i)==0, next(2))); v[n]= i; u[i]=1; break))); v
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Lagneau, Nov 04 2014
STATUS
approved