OFFSET
1,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..8789 (terms < 2^16)
EXAMPLE
The first terms, alongside their binary representation with a possible pairing, are:
n a(n) bin(a(n))
-- ---- ------------
1 0 0
2 3 (11)
3 9 (1(00)1)
4 12 (11)(00)
5 15 (11)(11)
6 33 (1(00)(00)1)
7 36 (1(00)1)(00)
8 39 (1(00)1)(11)
9 45 (1(0(11)0)1)
10 48 (11)(00)(00)
11 51 (11)(00)(11)
12 54 (11)(0(11)0)
13 57 (11)(1(00)1)
14 60 (11)(11)(00)
15 63 (11)(11)(11)
PROG
(PARI) is(n, base=2) = { my (u=0, s=0); while (n, my (d=n%base); if (u && s%base==d, u--; s\=base, u++; s=s*base+d); n\=base); u==0 }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 21 2020
STATUS
approved