OFFSET
1,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence (math.NT/0305308)
EXAMPLE
a(1) cannot be 1 because 1 is not prime; it cannot be 2, for then 1 is not in the sequence while a(1) is prime; nor can it be 3; but 4 is possible.
PROG
(PARI) s=0; n=1; for (v=2, 167, if (bitxor(bittest(s, n), !isprime(v)), print1 (v", "); n++; s+=2^v)) \\ Rémy Sigrist, Apr 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Vandermast and N. J. A. Sloane, Feb 01 2003
STATUS
approved