login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A079254
a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is prime".
37
4, 6, 8, 11, 12, 13, 14, 17, 18, 20, 23, 29, 31, 37, 38, 39, 41, 43, 44, 47, 48, 49, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 71, 73, 74, 79, 80, 83, 89, 90, 91, 97, 101, 103, 104, 105, 106, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167
OFFSET
1,1
LINKS
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
Cf. A079000.
Sequence in context: A054284 A295287 A351758 * A091178 A270448 A152019
KEYWORD
nonn
AUTHOR
STATUS
approved