OFFSET
0,5
COMMENTS
This sequence also represents the number of edges added to G so that it is complete, where G is a graph of (n-1)^2 nodes arranged in a rhombus and embedded in the hexagonal lattice. G begins with A045944(n-2) edges and a(n) edges are added to form a complete graph. - John Tyler Rascoe, Sep 24 2022
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: x^3*(x^3+3*x^2-15*x-1) / (x-1)^5.
a(n) = (n^4-4*n^3-n^2+18*n-16)/2 for n>=2, a(n) = 0 for n<2.
EXAMPLE
a(3) = 1:
._____.
|_| |_|
| |___|
|___|_| .
MAPLE
a:= n-> `if`(n<2, 0, ((((n-4)*n-1)*n+18)*n-16)/2):
seq(a(n), n=0..50);
MATHEMATICA
CoefficientList[Series[x^3 (x^3+3x^2-15x-1)/(x-1)^5, {x, 0, 40}], x] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {0, 0, 0, 1, 20, 87, 244}, 40] (* Harvey P. Dale, Mar 06 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jun 08 2014
STATUS
approved