login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260956 a(0)=1; a(n) = Sum_{k=1..n-1} d(k)*a(n-k), where d(m) is m-th bit in binary expansion of n. 2
1, 1, 1, 2, 2, 3, 5, 10, 10, 13, 23, 43, 66, 122, 231, 462, 462, 528, 759, 1452, 1980, 3201, 5412, 9603, 15015, 26598, 47025, 88638, 162261, 312939, 610863, 1221726, 1221726, 1310364, 1623303, 2547105, 3768831, 6300921, 9234588, 14715360, 21016281, 32797974 (list; graph; refs; listen; history; text; internal format)
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
Cf. A033639 (when binary digits are taken in the reverse order).
Sequence in context: A273034 A208437 A130377 * A360299 A344708 A322113
KEYWORD
nonn,base
AUTHOR
Anders Hellström, Sep 10 2015
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Jan 18 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)