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!)
A151788 Partial sums of A151787. 5

%I #14 Oct 31 2022 13:00:48

%S 1,4,7,13,16,22,28,40,43,49,55,67,73,85,97,121,124,130,136,148,154,

%T 166,178,202,208,220,232,256,268,292,316,364,367,373,379,391,397,409,

%U 421,445,451,463,475,499,511,535,559,607,613,625,637,661,673,697,721,769,781,805

%N Partial sums of A151787.

%H Robert Israel, <a href="/A151788/b151788.txt">Table of n, a(n) for n = 1..10000</a>

%H Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, p. 30.

%F G.f. g(x) satisfies g(x) = (2+1/x)*(1+x)*g(x^2) + x^2/(1-x). - _Robert Israel_, Feb 27 2018

%p wt:= n -> convert(convert(n,base,2),`+`):

%p ListTools:-PartialSums([1,seq(3*2^(wt(n-1)-1),n=2..100)]); # _Robert Israel_, Feb 27 2018

%t b[n_] := If[n == 1, 1, 3*2^(Total[IntegerDigits[n-1, 2]]-1)];

%t Array[b, 100] // Accumulate (* _Jean-François Alcover_, Mar 27 2019 *)

%o (PARI) b(n) = if (n==1, 1, 3*2^(hammingweight(n-1)-1));

%o a(n) = sum(k=1, n, b(k)); \\ _Michel Marcus_, Feb 27 2018

%Y Cf. A151787.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Jun 25 2009

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 March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)