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!)
A063915 G.f.: (1 + Sum_{ i >= 0 } 2^i*x^(2^(i+1)-1)) / (1-x)^2. 4
1, 3, 5, 9, 13, 17, 21, 29, 37, 45, 53, 61, 69, 77, 85, 101, 117, 133, 149, 165, 181, 197, 213, 229, 245, 261, 277, 293, 309, 325, 341, 373, 405, 437, 469, 501, 533, 565, 597, 629, 661, 693, 725, 757, 789, 821, 853, 885, 917, 949, 981, 1013, 1045, 1077, 1109 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
First differences are in A053644. Partial sums are in A063916.
LINKS
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 34, 37, 41.
FORMULA
a(n) = b(n+1), with b(2n) = 2*b(n)+2*b(n-1)+1, b(2n+1) = 4*b(n)+1.
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
MAPLE
a:= proc(n) option remember; `if`(n<0, 0, 1+
(t-> 2*(a(floor(t))+a(ceil(t))))(n/2-1))
end:
seq(a(n), n=0..55); # Alois P. Heinz, Jul 10 2019
MATHEMATICA
b[n_] := b[n] = If[EvenQ[n], 2 b[n/2] + 2 b[n/2-1] + 1, 4 b[(n-1)/2] + 1];
b[1] = 1; b[2] = 3;
a[n_] := b[n+1];
a /@ Range[0, 55] (* Jean-François Alcover, Nov 02 2020 *)
PROG
(PARI) a(n) = n+=2; my(k=logint(n, 2)); n<<k - (2<<(2*k))\/3; \\ Kevin Ryde, Nov 27 2020
CROSSREFS
Sequence in context: A063954 A123509 A196094 * A340520 A183859 A096228
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Sep 01 2001
EXTENSIONS
More terms from Ralf Stephan, Sep 15 2003
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 May 5 05:35 EDT 2024. Contains 372257 sequences. (Running on oeis4.)