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.

A002447 Expansion of 1/(1-2*x^2-3*x^3).

Original entry on oeis.org

1, 0, 2, 3, 4, 12, 17, 36, 70, 123, 248, 456, 865, 1656, 3098, 5907, 11164, 21108, 40049, 75708, 143422, 271563, 513968, 973392, 1842625, 3488688, 6605426, 12505251, 23676916, 44826780, 84869585, 160684308
Offset: 0

Views

Author

Keywords

Programs

  • GAP
    a:=[1,0,2];; for n in [4..40] do a[n]:=2*a[n-2]+3*a[n-3]; od; a; # G. C. Greubel, Jul 04 2019
  • Magma
    I:=[1, 0, 2]; [n le 3 select I[n] else 2*Self(n-2)+3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 11 2012
    
  • Mathematica
    CoefficientList[Series[1/(1-2*x^2-3*x^3),{x,0,40}],x] (* Vincenzo Librandi, Jun 11 2012 *)
    LinearRecurrence[{0,2,3}, {1,0,2}, 40] (* G. C. Greubel, Jul 04 2019 *)
  • PARI
    Vec(1/(1-2*x^2-3*x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    (1/(1-2*x-3*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jul 04 2019
    

Formula

From Paul Barry, Oct 16 2004: (Start)
a(n) = 2*a(n-2) + 3*a(n-3).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2*k)*2^k*(3/2)^(n-2*k). (End)