OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100000
MAPLE
b:= proc(n) option remember; `if`(n=0, 0, a(n)+b(n-1)) end:
a:= n-> `if`(n=1, 1, add(i, i=Bits[Split](b(n-1)))):
seq(a(n), n=1..120); # Alois P. Heinz, Aug 30 2019
MATHEMATICA
a[1] = 1; s[n_] := Sum[a[k], {k, 1, n - 1}]; a[n_] := a[n] = DigitCount[s[n], 2, 1]; Array[a, 100] (* Amiram Eldar, Jul 27 2023 *)
PROG
(PARI) { my(s=0, t=1); for(j=1, 100, print1(t, ", "); s+=t; t=hammingweight(s)); } \\ Joerg Arndt, Aug 30 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Petr Stanicek, Aug 22 2019
STATUS
approved