OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..4575 (terms n = 1..1000 from Anders Hellström)
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, (l-> add(
a(n-i)*l[-i], i=1..nops(l)))(convert(n, base, 2)))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Jan 18 2019
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Total[(d = IntegerDigits[n, 2]) * Table[a[n - k], {k, 1, Length[d]}]]; Array[a, 50, 0] (* Amiram Eldar, Jul 25 2023 *)
PROG
(PARI) first(m)=my(v=vector(m)); v[1]=1; v[2]=1; for(i=3, m, v[i]=0; d=digits(i, 2); for(j=1, #d, v[i]+=d[j]*v[i-j])); v
(PARI) lista(nn) = {my(va = vector(nn), vb); va[1] = 1; for (n=2, nn, vb = binary(n); va[n] = sum(k=1, #vb, vb[k]*(if (n==k, 1, va[n-k]))); ); concat(1, va); } \\ Michel Marcus, Jan 12 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Anders Hellström, Sep 10 2015
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Jan 18 2019
STATUS
approved