OFFSET
0,2
LINKS
Donald E. Knuth, Selected Papers on Fun and Games, Stanford, California: Center for the Study of Language and Information (2011).
EXAMPLE
(1)_2 = 1, so a(1) = 1a(0) = 10.
(2)_2 = 10, so a(2) = 1a(1)0 = 1100.
(3)_2 = 11, so a(3) = 1a(1)1 = 1101.
(4)_2 = 100, so a(4) = 1a(2)00 = 1110000.
(5)_2 = 101, so a(5) = 1a(2)01 = 1110001.
(6)_2 = 110, so a(6) = 1a(2)10 = 1110010.
(7)_2 = 111, so a(7) = 1a(2)11 = 1110011.
(8)_2 = 1000, so a(8) = 1a(3)000 = 11101000.
PROG
(Python)
def a(n):
b = bin(n)[3:]
return 0 if n == 0 else int('1' + str(a(len(b))) + b)
print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 22 2017
STATUS
approved