OFFSET
0,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..25000
Carl Pomerance, John Michael Robson, and Jeffrey Shallit, Automaticity II: Descriptional complexity in the unary case, Theoretical computer science 180.1-2 (1997): 181-201.
FORMULA
PROG
(PARI) a(n) = my (b=binary(n+1)); b[1]++; fromdigits(b) \\ Rémy Sigrist, Oct 04 2018
(Python)
def a(n): return int(bin(n)[2:].replace('1', '2', 1))
print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Feb 20 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 04 2018
EXTENSIONS
Data corrected and extended by Rémy Sigrist, Oct 04 2018
STATUS
approved