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.

A135254 Binomial transform of A131666.

Original entry on oeis.org

0, 0, 1, 4, 12, 33, 90, 252, 729, 2160, 6480, 19521, 58806, 176904, 531441, 1595052, 4785156, 14353281, 43053282, 129146724, 387420489, 1162241784, 3486725352, 10460235105, 31380882462, 94143001680, 282429536481, 847289140884
Offset: 0

Views

Author

Paul Curtz, Nov 30 2007

Keywords

Crossrefs

Cf. A133474.

Programs

  • GAP
    a:=[0,1,4];; for n in [4..30] do a[n]:=6*a[n-1]-12*a[n-2]+9*a[n-3]; od; Concatenation([0], a); # G. C. Greubel, Nov 21 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0,0] cat Coefficients(R!( x^2*(1-2*x)/((1-3*x+3*x^2)*(1-3*x)) )); // G. C. Greubel, Nov 21 2019
    
  • Maple
    seq(coeff(series(x^2*(1-2*x)/((1-3*x+3*x^2)*(1-3*x)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 21 2019
  • Mathematica
    CoefficientList[Series[x^2(2x-1)/((3x^2-3x+1)(3x-1)),{x,0,30}],x] (* or *) LinearRecurrence[{6,-12,9},{0,0,1,4},30] (* Harvey P. Dale, May 26 2011 *)
  • PARI
    my(x='x+O('x^30)); concat([0,0], Vec(x^2*(1-2*x)/((1-3*x+3*x^2)*(1-3*x)))) \\ G. C. Greubel, Nov 21 2019
    
  • Sage
    def A135254_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x^2*(1-2*x)/((1-3*x+3*x^2)*(1-3*x))).list()
    A135254_list(30) # G. C. Greubel, Nov 21 2019
    

Formula

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

Extensions

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