|
|
A288918
|
|
Number of 4-cycles in the n X n king graph.
|
|
4
|
|
|
0, 3, 29, 79, 153, 251, 373, 519, 689, 883, 1101, 1343, 1609, 1899, 2213, 2551, 2913, 3299, 3709, 4143, 4601, 5083, 5589, 6119, 6673, 7251, 7853, 8479, 9129, 9803, 10501, 11223, 11969, 12739, 13533, 14351, 15193, 16059, 16949, 17863
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x^2*(3 + 20*x + x^2) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)
E.g.f.: exp(x)*(23 - 22*x + 12*x^2) - 23 - x. - Stefano Spezia, Aug 14 2022
|
|
MATHEMATICA
|
Table[If[n == 1, 0, 23 - 34 n + 12 n^2], {n, 20}]
Join[{0}, LinearRecurrence[{3, -3, 1}, {1, 3, 29}, {2, 20}]]
CoefficientList[Series[(-3 x - 20 x^2 - x^3)/(-1 + x)^3, {x, 0, 20}], x]
|
|
PROG
|
(PARI) concat(0, Vec(x^2*(3 + 20*x + x^2) / (1 - x)^3 + O(x^40))) \\ Colin Barker, Mar 11 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|