OFFSET
0,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = Vertices + Edges*(n-2) + Faces*facenumber(n-3) = 20 + 30(n-2) + 12*A000326(n-3). - Mitch Harris, Oct 25 2006
From G. C. Greubel, Aug 30 2019: (Start)
G.f.: x*(1 + 17*x - 7*x^2 + x^3 + 24*x^4)/(1-x)^3.
E.g.f.: -140 -73*x -12*x^2 + (140 -66*x +18*x^2)*exp(x). (End)
MAPLE
seq(coeff(series(x*(1+17*x-7*x^2+x^3+24*x^4)/(1-x)^3, x, n+1), x, n), n = 0 .. 45); # G. C. Greubel, Aug 30 2019
MATHEMATICA
Join[{0, 1, 20}, 2((3Range[3, 40]-7)^2+21)] (* Harvey P. Dale, Sep 24 2011 *)
Join[{0, 1, 20}, CoefficientList[Series[2*(25-29*x+22*x^2)/(1-x)^3, {x, 0, 50}], x] ] (* Vincenzo Librandi, Jul 07 2012 *)
PROG
(Magma) I:=[0, 1, 20, 50, 92, 170]; [n le 6 select I[n] else 3*Self(n-1) -3*Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jul 07 2012
(PARI) my(x='x+O('x^45)); concat([0], Vec(x*(1+17*x-7*x^2+x^3+24*x^4)/(1-x)^3)) \\ G. C. Greubel, Aug 30 2019
(Sage)
def A007589_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1+17*x-7*x^2+x^3+24*x^4)/(1-x)^3).list()
A007589_list(45) # G. C. Greubel, Aug 30 2019
(GAP) a:=[50, 92, 170];; for n in [4..45] do a[n]:=3*a[n-1]-3*a[n-2]+ a[n-3]; od; Concatenation([0, 1, 20], a); # G. C. Greubel, Aug 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Revised definition from N. J. A. Sloane, Sep 25 2011
STATUS
approved