OFFSET
1,2
FORMULA
a(n) = 1 (if n = 1); a(n) = n + a("occurrence of digit 1 in n(binary)") else;
EXAMPLE
a(13)=19 because 13 = (1101) -> (1+1+0+1 = 11) -> (1+1 = 10) -> (1+0 = 1) = 1 and 1101+11+10+1(binary) = 19(decimal).
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Frank Schwellinger (nummer_eins(AT)web.de), Dec 17 2002
STATUS
approved