OFFSET
1,1
COMMENTS
Kronecker(i,j) is an extension of the Jacobi symbol to all integers. The sequence with the condition Kronecker(a(i), a(n)) = -1/+1 is given by A247665.
EXAMPLE
a(1) = 2 because the next term is 7 and k(2,7) = 1;
a(2) = 7 because the next two terms are (3,4) => k(7,3) = 1 and k(7,4) = 1;
a(3) = 3 because the next three terms are (4,11,25) => k(3,4)= 1, k(3,11) = 1 and k(3,25) = 1.
PROG
(PARI) m=55; v=vector(m); u=vectorsmall(1000*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
AUTHOR
Michel Lagneau, Nov 05 2014
STATUS
approved