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!)
A174868 Partial sums of Stern's diatomic series A002487. 4
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, 89, 94, 102, 105, 112, 116, 121, 122, 128, 133, 142, 146, 157, 164, 174, 177, 188, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
After the initial 0, identical to A007729.
LINKS
Michael J. Collins and David Wilson, Equivalence of OEIS A007729 and A174868, arXiv:1812.11174 [math.CO], 2018.
Clemens Heuberger, Daniel Krenn and Gabriel F. Lipnik, Asymptotic Analysis of q-Recursive Sequences, Algorithmica, Vol. 84 (2022), pp. 2480-2532; arXiv preprint, arXiv:2105.04334 [math.CO], 2021-2022.
FORMULA
a(n) = Sum_{i=0..n} A002487(i).
G.f.: (x/(1 - x))*Product_{k>=0} (1 + x^(2^k) + x^(2^(k+1))). - Ilya Gutkovskiy, Feb 27 2017
a(2k) = 2*a(k) + a(k-1); a(2k+1) = 2*a(k) + a(k+1). - Michael J. Collins, Dec 25 2018
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
EXAMPLE
a(16) = 0 + 1 + 1 + 2 + 1 + 3 + 2 + 3 + 1 + 4 + 3 + 5 + 2 + 5 + 3 + 4 + 1 = 41.
MATHEMATICA
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 *)
PROG
(Python)
from itertools import accumulate, count, islice
from functools import reduce
def A174868_gen(): # generator of terms
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)
A174868_list = list(islice(A174868_gen(), 30)) # Chai Wah Wu, May 07 2023
CROSSREFS
Sequence in context: A157007 A173509 A007729 * A268381 A186349 A304360
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 01 2010
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 25 09:19 EDT 2024. Contains 371967 sequences. (Running on oeis4.)