OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
n=13, decimal 13 is 1101 in binary, the 1's are at positions 1,2,4. So a(13) = a(1) + a(2) + a(4).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Total[a /@ (Position[IntegerDigits[n, 2], 1] // Flatten)]; Array[a, 100] (* Amiram Eldar, Jul 24 2023 *)
PROG
(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]*va[k]); ); va; } \\ Michel Marcus, Jan 12 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ctibor O. Zizka, Jan 12 2019
STATUS
approved