

A214913


a(n+1) = a(n) + max(1, count0s), where count0s is number of 0's in binary representation of a(n).


2



0, 1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 16, 20, 23, 24, 27, 28, 30, 31, 32, 37, 40, 44, 47, 48, 52, 55, 56, 59, 60, 62, 63, 64, 70, 74, 78, 81, 85, 88, 92, 95, 96, 101, 104, 108, 111, 112, 116, 119, 120, 123, 124, 126, 127, 128, 135, 139, 143, 146, 151, 154, 158
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS



MATHEMATICA

NestList[#+Max[1, DigitCount[#, 2, 0]]&, 0, 70] (* Harvey P. Dale, Apr 21 2016 *)


PROG

(Python)
a = 0
for n in range(100):
print a,
ta = a
c0 = (a==0)
while ta>0:
c0 += 1(ta&1)
ta >>= 1
a += max(c0, 1)


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



