OFFSET
1,2
COMMENTS
LINKS
EXAMPLE
The first terms, alongside their binary expansion, are:
n a(n) bin(a(n))
-- ---- ---------
1 1 1
2 9 1001
3 8 1000
4 10 1010
5 14 1110
6 15 1111
7 143 10001111
8 142 10001110
9 140 10001100
10 141 10001101
11 133 10000101
12 132 10000100
13 134 10000110
14 135 10000111
15 391 110000111
16 390 110000110
17 388 110000100
18 384 110000000
19 385 110000001
20 387 110000011
PROG
(PARI) s=2^0; v=1; for (n=1, 54, print1 (v", "); s+=2^v; for (x=0, oo, if (!bittest(s, w=bitxor(v, 2^x)) && !isprime(w), v=w; break)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 28 2021
STATUS
approved