login
Partial sums of A005590.
3

%I #21 Feb 27 2017 21:19:11

%S 0,1,2,2,3,2,2,3,4,2,1,2,2,3,4,4,5,2,0,1,0,2,3,2,2,3,4,4,5,4,4,5,6,2,

%T -1,0,-2,1,2,0,-1,2,4,3,4,2,1,2,2,3,4,4,5,4,4,5,6,4,3,4,4,5,6,6,7,2,

%U -2,-1,-4,0,1,-2,-4,1,4,2,3,0,-2,-1,-2,2,5

%N Partial sums of A005590.

%C a(n+1) = a(n) + A005590(n+1).

%H Reinhard Zumkeller, <a href="/A182093/b182093.txt">Table of n, a(n) for n = 0..10000</a>

%F a(2^n) = n + 1.

%F G.f.: (x/(1 - x))*Product_{k>=0} (1 + x^(2^k) - x^(2^(k+1))). - _Ilya Gutkovskiy_, Feb 27 2017

%t a[0] = 0; a[1] = 1; a[n_] := a[n] = If[OddQ@ n, a[(n - 1)/2 + 1] - a[(n - 1)/2], a[n/2]]; Accumulate@ Table[a@ n, {n, 0, 104}] (* after _Jean-François Alcover_ at A005590, or *)

%t Table[SeriesCoefficient[(x/(1 - x)) Product[(1 + x^(2^k) - x^(2^(k + 1))), {k, 0, n}], {x, 0, n}], {n, 0, 70}] (* _Michael De Vlieger_, Feb 27 2017 *)

%o (Haskell)

%o a182093 n = a182093_list !! n

%o a182093_list = scanl1 (+) a005590_list

%Y Cf. A005590.

%K sign,look

%O 0,3

%A _Reinhard Zumkeller_, Apr 11 2012