OFFSET
1,1
COMMENTS
Prism graphs are defined for n >= 3; extended to n=1 using closed form.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Molecular Topological Index
Eric Weisstein's World of Mathematics, Prism Graph
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = (3/2)*n*(11 + (-1)^n + 2*n*(2 + n)).
G.f.: 12*x*(x+2)*(x^3 - x^2 + x + 1) / ( (1+x)^2*(x-1)^4 ). - R. J. Mathar, Jul 11 2011
E.g.f.: (3/2)*x*(-exp(-x) + (17 + 10*x + 2*x^2)*exp(x)). - G. C. Greubel, Jan 04 2019
MAPLE
seq((3/2)*n*(11+(-1)^n+2*n*(2+n)), n=1..40); # Muniru A Asiru, Jan 05 2019
MATHEMATICA
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {24, 84, 180, 360, 600, 972, 1428}, 40] (* or *) Table[3/2 n (11 +(-1)^n +2n(n+2)), {n, 40}] (* Eric W. Weisstein, May 11 2017 *)
PROG
(PARI) vector(40, n, (3/2)*n*(11 + (-1)^n + 2*n*(2 + n))) \\ G. C. Greubel, Jan 04 2019
(Magma) [(3/2)*n*(11 + (-1)^n + 2*n*(2 + n)): n in [1..40]]; // G. C. Greubel, Jan 04 2019
(Sage) [(3/2)*n*(11 + (-1)^n + 2*n*(2 + n)) for n in (1..40)] # G. C. Greubel, Jan 04 2019
(GAP) List([1..40], n -> (3/2)*n*(11 + (-1)^n + 2*n*(2 + n))); # G. C. Greubel, Jan 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Jul 11 2011
STATUS
approved