%I #35 Oct 29 2022 11:51:57
%S 1,3,5,9,13,17,21,29,37,45,53,61,69,77,85,101,117,133,149,165,181,197,
%T 213,229,245,261,277,293,309,325,341,373,405,437,469,501,533,565,597,
%U 629,661,693,725,757,789,821,853,885,917,949,981,1013,1045,1077,1109
%N G.f.: (1 + Sum_{ i >= 0 } 2^i*x^(2^(i+1)-1)) / (1-x)^2.
%C First differences are in A053644. Partial sums are in A063916.
%H Alois P. Heinz, <a href="/A063915/b063915.txt">Table of n, a(n) for n = 0..10000</a>
%H Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, pp. 34, 37, 41.
%H Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a>
%H Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>
%F a(n) = b(n+1), with b(2n) = 2*b(n)+2*b(n-1)+1, b(2n+1) = 4*b(n)+1.
%F a(n) = (n+2)*2^k - (2*4^k + 1)/3 where k = floor(log_2(n+2)) = A000523(n+2). - _Kevin Ryde_, Nov 27 2020
%p a:= proc(n) option remember; `if`(n<0, 0, 1+
%p (t-> 2*(a(floor(t))+a(ceil(t))))(n/2-1))
%p end:
%p seq(a(n), n=0..55); # _Alois P. Heinz_, Jul 10 2019
%t b[n_] := b[n] = If[EvenQ[n], 2 b[n/2] + 2 b[n/2-1] + 1, 4 b[(n-1)/2] + 1];
%t b[1] = 1; b[2] = 3;
%t a[n_] := b[n+1];
%t a /@ Range[0, 55] (* _Jean-François Alcover_, Nov 02 2020 *)
%o (PARI) a(n) = n+=2; my(k=logint(n,2)); n<<k - (2<<(2*k))\/3; \\ _Kevin Ryde_, Nov 27 2020
%Y Cf. A000523, A053644, A063916.
%K nonn,look
%O 0,2
%A _N. J. A. Sloane_, Sep 01 2001
%E More terms from _Ralf Stephan_, Sep 15 2003