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.

A166752 Interleave A007583 and A000012.

Original entry on oeis.org

1, 1, 3, 1, 11, 1, 43, 1, 171, 1, 683, 1, 2731, 1, 10923, 1, 43691, 1, 174763, 1, 699051, 1, 2796203, 1, 11184811, 1, 44739243, 1, 178956971, 1, 715827883, 1, 2863311531, 1, 11453246123, 1, 45812984491, 1, 183251937963, 1, 733007751851, 1
Offset: 0

Views

Author

Paul Barry, Oct 21 2009

Keywords

Comments

Partial sums are A166753.

Programs

  • Magma
    [(4*4^Floor(n/2)-1)/3 - 2*Floor(2^n/3): n in [0..25]]; // G. C. Greubel, Oct 10 2017
  • Mathematica
    LinearRecurrence[{0, 5, 0, -4}, {1, 1, 3, 1}, 100] (* G. C. Greubel, May 24 2016 *)
  • PARI
    x='x+O('x^50); Vec((1+x-2*x^2-4*x^3)/(1-5*x^2+4*x^4)) \\ G. C. Greubel, Oct 10 2017
    

Formula

G.f.: (1+x-2*x^2-4*x^3)/(1-5*x^2+4*x^4).
G.f.: (1+x)/(1-5*x^2+4*x^4) - 2*x^2*(1+2*x)/(1-5*x^2+4*x^4).
a(n) = (4*4^floor(n/2)-1)/3 - 2*floor(2^n/3).
a(n) = 4*4^floor(n/2)/3 - 2*2^n/3 - (-1)^n/3 + 2/3.
a(n) = A002450(floor(n/2)+1) - 2*A000975(n-1).