OFFSET
1,2
COMMENTS
By Dirichlet's theorem on arithmetic progressions, we can always extend the sequence: say a(n) < 2^k:
- if a(n) is odd: a(n) and 2^k are coprime and there are infinitely many prime numbers of the form a(n) + m*2^k = a(n) XOR m*2^k, and we can extend the sequence,
- if a(n) is even: a(n)+1 and 2^k are coprime and there are infinitely many prime numbers of the form a(n)+1 + m*2^k = a(n) XOR (1+m*2^k), and we can extend the sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
The first terms, alongside the corresponding prime numbers, are:
n a(n) a(n) XOR a(n+1)
-- ---- ---------------
1 1 3
2 2 7
3 5 3
4 6 5
5 3 7
6 4 3
7 7 13
8 10 2
9 8 3
10 11 2
PROG
(PARI) s=0; v=1; for (n=1, 67, print1 (v ", "); s+=2^v; for (w=1, oo, if (!bittest(s, w) && isprime(bitxor(v, w)), v=w; break)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 21 2020
STATUS
approved