login
A249692
a(1)=2; thereafter, a(n) is the smallest number not occurring earlier such that Kronecker(a(k), a(n)) = -1 for the next n indices k = n+1, n+2, ..., 2n.
2
2, 3, 5, 7, 13, 33, 20, 73, 47, 193, 113, 683, 103, 433, 45, 562, 1313, 10307, 4013, 12613, 9133, 10643, 5537, 31307, 16727, 50923, 66463, 195227, 92237, 229913, 125, 342763, 2248
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
Cf. A247665.
Sequence in context: A355521 A048414 A048399 * A140768 A192578 A050779
KEYWORD
nonn,more
AUTHOR
Michel Lagneau, Nov 04 2014
STATUS
approved