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.

A063915 G.f.: (1 + Sum_{ i >= 0 } 2^i*x^(2^(i+1)-1)) / (1-x)^2.

Original entry on oeis.org

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
Offset: 0

Views

Author

N. J. A. Sloane, Sep 01 2001

Keywords

Comments

First differences are in A053644. Partial sums are in A063916.

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = n+=2; my(k=logint(n,2)); n<Kevin Ryde, Nov 27 2020

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

Extensions

More terms from Ralf Stephan, Sep 15 2003