cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A346912 #46 May 04 2025 13:42:31
%S A346912 1,3,7,11,19,27,39,51,71,91,119,147,187,227,279,331,403,475,567,659,
%T A346912 779,899,1047,1195,1383,1571,1799,2027,2307,2587,2919,3251,3655,4059,
%U A346912 4535,5011,5579,6147,6807,7467,8247,9027,9927,10827,11875,12923,14119,15315
%N A346912 a(0) = 1; a(n) = a(n-1) + a(floor(n/2)) + 1.
%H A346912 Robert Israel, <a href="/A346912/b346912.txt">Table of n, a(n) for n = 0..10000</a>
%F A346912 G.f.: (1/(1 - x)) * (-1 + 2 * Product_{k>=0} 1/(1 - x^(2^k))).
%F A346912 a(n) = n + 1 + Sum_{k=1..n} a(floor(k/2)).
%F A346912 a(n) = 2 * A000123(n) - 1.
%F A346912 a(n) = 4 * A033485(n) - 1 for n > 0. - _Hugo Pfoertner_, Aug 12 2021
%F A346912 From _Michael Tulskikh_, Aug 12 2021: (Start)
%F A346912 2*a(2n) = a(2n-1) + a(2n+1).
%F A346912 a(2n) = a(2n-2) + a(n-1) + a(n) + 2.
%F A346912 a(2n) = 2*(Sum_{i=0..n} a(i)) - a(n) + 2n. (End)
%p A346912 f:= proc(n) option remember; procname(n-1) + procname(floor(n/2)) + 1 end proc;
%p A346912 f(0):= 1:
%p A346912 map(f, [$1..50]); # _Robert Israel_, May 04 2025
%t A346912 a[0] = 1; a[n_] := a[n] = a[n - 1] + a[Floor[n/2]] + 1; Table[a[n], {n, 0, 47}]
%t A346912 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 A346912 (Python)
%o A346912 from itertools import islice
%o A346912 from collections import deque
%o A346912 def A346912_gen(): # generator of terms
%o A346912     aqueue, f, b, a = deque([2]), True, 1, 2
%o A346912     yield from (1, 3, 7)
%o A346912     while True:
%o A346912         a += b
%o A346912         yield 4*a - 1
%o A346912         aqueue.append(a)
%o A346912         if f: b = aqueue.popleft()
%o A346912         f = not f
%o A346912 A346912_list = list(islice(A346912_gen(),40)) # _Chai Wah Wu_, Jun 08 2022
%Y A346912 Cf. A000123, A018819, A022907, A033485, A102378, A102379.
%K A346912 nonn
%O A346912 0,2
%A A346912 _Ilya Gutkovskiy_, Aug 11 2021