%I #42 May 18 2023 10:40:50
%S 0,1,2,4,5,8,10,13,14,18,21,26,28,33,36,40,41,46,50,57,60,68,73,80,82,
%T 89,94,102,105,112,116,121,122,128,133,142,146,157,164,174,177,188,
%U 196,209,214,226,233,242,244,253,260,272,277,290,298,309,312,322,329,340,344,353,358,364,365,372,378,389,394,408,417,430,434,449,460,478,485,502,512,525,528,542,553,572,580,601,614,632,637,654,666,685
%N Partial sums of Stern's diatomic series A002487.
%C After the initial 0, identical to A007729.
%H Amiram Eldar, <a href="/A174868/b174868.txt">Table of n, a(n) for n = 0..10000</a>
%H Michael J. Collins and David Wilson, <a href="https://arxiv.org/abs/1812.11174">Equivalence of OEIS A007729 and A174868</a>, arXiv:1812.11174 [math.CO], 2018.
%H Clemens Heuberger, Daniel Krenn and Gabriel F. Lipnik, <a href="https://doi.org/10.1007/s00453-022-00950-y">Asymptotic Analysis of q-Recursive Sequences</a>, Algorithmica, Vol. 84 (2022), pp. 2480-2532; <a href="https://arxiv.org/abs/2105.04334">arXiv preprint</a>, arXiv:2105.04334 [math.CO], 2021-2022.
%F a(n) = Sum_{i=0..n} A002487(i).
%F G.f.: (x/(1 - x))*Product_{k>=0} (1 + x^(2^k) + x^(2^(k+1))). - _Ilya Gutkovskiy_, Feb 27 2017
%F a(2k) = 2*a(k) + a(k-1); a(2k+1) = 2*a(k) + a(k+1). - _Michael J. Collins_, Dec 25 2018
%F a(n) = n^log_2(3) + Psi_D(log_2(n)) + O(n^log_2(phi)), where phi is the golden ratio (A001622) and Psi_D is a 1-periodic continuous function which is Hölder continuous with any exponent smaller than log_2(3/phi) (Heuberger et al., 2022). - _Amiram Eldar_, May 18 2023
%e a(16) = 0 + 1 + 1 + 2 + 1 + 3 + 2 + 3 + 1 + 4 + 3 + 5 + 2 + 5 + 3 + 4 + 1 = 41.
%t a[n_] := a[n] = If[EvenQ[n], 2*a[n/2] + a[n/2 - 1], 2*a[(n - 1)/2] + a[(n + 1)/2]]; a[0] = 0; a[1] = 1; Array[a, 100, 0] (* _Amiram Eldar_, May 18 2023 *)
%o (Python)
%o from itertools import accumulate, count, islice
%o from functools import reduce
%o def A174868_gen(): # generator of terms
%o return accumulate((sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) for n in count(1)),initial=0)
%o A174868_list = list(islice(A174868_gen(),30)) # _Chai Wah Wu_, May 07 2023
%Y Cf. A002487, A007729, A084091, A049456, A020946, A020950, A046815, A070871, A070872, A071883, A064881-A064886, A072170, A001045, A002083, A073459, A000123, A126606, A049455.
%Y Cf. A001622, A242208.
%K nonn,easy
%O 0,3
%A _Jonathan Vos Post_, Dec 01 2010