OFFSET
0,2
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
If n<2, a(n) = 2n, otherwise, a(n) = A233272(a(n-1)). - Antti Karttunen, Dec 12 2013
MATHEMATICA
NestList[#+1+DigitCount[#, 2, 0]&, 0, 60] (* Harvey P. Dale, Sep 25 2013 *)
PROG
(Python)
a = 0
for n in range(100):
print(a, end=', ')
ta = a
c0 = (a==0)
while ta>0:
c0 += 1-(ta&1)
ta >>= 1
a += 1 + c0
(Scheme)
;; With memoizing definec-macro from Antti Karttunen's IntSeq-library.
;; Antti Karttunen, Dec 12 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Sep 08 2012
EXTENSIONS
Name edited by Antti Karttunen, Dec 12 2013
STATUS
approved