The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A346912 a(0) = 1; a(n) = a(n-1) + a(floor(n/2)) + 1. 0

%I #42 Jun 08 2022 16:22:32

%S 1,3,7,11,19,27,39,51,71,91,119,147,187,227,279,331,403,475,567,659,

%T 779,899,1047,1195,1383,1571,1799,2027,2307,2587,2919,3251,3655,4059,

%U 4535,5011,5579,6147,6807,7467,8247,9027,9927,10827,11875,12923,14119,15315

%N a(0) = 1; a(n) = a(n-1) + a(floor(n/2)) + 1.

%F G.f.: (1/(1 - x)) * (-1 + 2 * Product_{k>=0} 1/(1 - x^(2^k))).

%F a(n) = n + 1 + Sum_{k=1..n} a(floor(k/2)).

%F a(n) = 2 * A000123(n) - 1.

%F a(n) = 4 * A033485(n) - 1 for n > 0. - _Hugo Pfoertner_, Aug 12 2021

%F From _Michael Tulskikh_, Aug 12 2021: (Start)

%F 2*a(2n) = a(2n-1) + a(2n+1).

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

%F a(2n) = 2*(Sum_{i=0..n} a(i)) - a(n) + 2n. (End)

%t a[0] = 1; a[n_] := a[n] = a[n - 1] + a[Floor[n/2]] + 1; Table[a[n], {n, 0, 47}]

%t nmax = 47; CoefficientList[Series[(1/(1 - x)) (-1 + 2 Product[1/(1 - x^(2^k)), {k, 0, Floor[Log[2, nmax]]}]), {x, 0, nmax}], x]

%o (Python)

%o from itertools import islice

%o from collections import deque

%o def A346912_gen(): # generator of terms

%o aqueue, f, b, a = deque([2]), True, 1, 2

%o yield from (1, 3, 7)

%o while True:

%o a += b

%o yield 4*a - 1

%o aqueue.append(a)

%o if f: b = aqueue.popleft()

%o f = not f

%o A346912_list = list(islice(A346912_gen(),40)) # _Chai Wah Wu_, Jun 08 2022

%Y Cf. A000123, A018819, A022907, A033485, A102378, A102379.

%K nonn

%O 0,2

%A _Ilya Gutkovskiy_, Aug 11 2021

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 June 10 19:30 EDT 2024. Contains 373280 sequences. (Running on oeis4.)