OFFSET
1,2
COMMENTS
This sequence combines features of A000027 (where two consecutive terms are coprime) and of A109812 (where two consecutive terms have no common 1-bits in their binary expansions).
For any n > 0, n and a(n) have the same parity.
The sequence is well defined:
- after an odd term v: we can extend the sequence with a power of 2 greater than any previous term,
- after an even term v < 2^k: we can extend the sequence with a prime number of the form 1 + t*2^k (Dirichlet's theorem on arithmetic progressions guarantees us that there is an infinity of such prime numbers).
This sequence is a permutation of the positive integers (with inverse A353604):
- the sequence is clearly unbounded,
- so we have even terms of infinitely many different binary lengths,
- the first even term with binary length w > 1 is necessarily 2^(w-1),
- so we have infinitely many powers of 2 in the sequence,
- so eventually all odd numbers will appear in the sequence,
- and all prime numbers will appear in the sequence,
- and eventually any even number v < 2^k must appear in the sequence (for instance after a prime number of the form 1 + t*2^k).
LINKS
EXAMPLE
The first terms, alongside their binary expansion and distinct prime factors, are:
n a(n) bin(a(n)) dpf(a(n))
-- ---- --------- ----------
1 1 1 None
2 2 10 2
3 5 101 5
4 8 1000 2
5 3 11 3
6 4 100 2
7 9 1001 3
8 16 10000 2
9 7 111 7
10 24 11000 2 3
11 35 100011 5 7
12 12 1100 2 3
13 17 10001 17
14 6 110 2 3
PROG
(PARI) { s=0; v=1; for (n=1, 66, print1 (v", "); s+=2^v; for (w=1, oo, if (!bittest(s, w) && bitand(v, w)==0 && gcd(v, w)==1, v=w; break))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 07 2022
STATUS
approved