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.

A136297 a(n) = 3*a(n-1) - 3*a(n-2) + 3*a(n-3), with a(0)=1, a(1)=3, a(2)=1.

Original entry on oeis.org

1, 3, 1, -3, -3, 3, 9, 9, 9, 27, 81, 189, 405, 891, 2025, 4617, 10449, 23571, 53217, 120285, 271917, 614547, 1388745, 3138345, 7092441, 16028523, 36223281, 81861597, 185000517, 418086603, 944843049, 2135270889, 4825543329, 10905346467, 24645222081, 55696256829, 125869143645
Offset: 0

Views

Author

Paul Curtz, Mar 21 2008

Keywords

Crossrefs

Cf. A052103.

Programs

  • Magma
    I:=[1,3,1]; [n le 3 select I[n] else 3*(Self(n-1) -Self(n-2) +Self(n-3)): n in [1..41]]; // G. C. Greubel, Apr 12 2021
    
  • Maple
    m:=40; S:=series( (1-5*x^2)/(1-3*x+3*x^2-3*x^3), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Apr 12 2021
  • Mathematica
    LinearRecurrence[{3,-3,3},{1,3,1},40] (* Harvey P. Dale, Jun 22 2013 *)
  • Sage
    def A136297_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-5*x^2)/(1-3*x+3*x^2-3*x^3) ).list()
    A136297_list(40) # G. C. Greubel, Apr 12 2021

Formula

From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (1 -5*x^2)/(1 -3*x +3*x^2 -3*x^3).
a(n) = A052103(n+1) - 5*A052103(n-1). (End)

Extensions

More terms from R. J. Mathar, Apr 04 2008