A288919 Number of 5-cycles in the n X n king graph.
0, 0, 52, 176, 372, 640, 980, 1392, 1876, 2432, 3060, 3760, 4532, 5376, 6292, 7280, 8340, 9472, 10676, 11952, 13300, 14720, 16212, 17776, 19412, 21120, 22900, 24752, 26676, 28672
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Eric Weisstein's World of Mathematics, Graph Cycle
- Eric Weisstein's World of Mathematics, King Graph
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Mathematica
Table[If[n == 1, 0, 4 (n - 2) (9 n - 14)], {n, 30}] Join[{0, 0}, LinearRecurrence[{3, -3, 1}, {20, 0, 52}, {3, 20}]] CoefficientList[Series[-((4 x^2 (13 + 5 x))/(-1 + x)^3), {x, 0, 20}], x]
-
PARI
a(n)=if(n<3, 0, 36*n^2-128*n+112) \\ Charles R Greathouse IV, Jun 19 2017
-
PARI
concat([0,0], Vec(4*x^3*(13 + 5*x) / (1 - x)^3 + O(x^40))) \\ Colin Barker, Mar 11 2019
Formula
a(n) = 36*n^2 - 128*n + 112 for n > 1. - Andrew Howroyd, Jun 19 2017
From Colin Barker, Mar 11 2019: (Start)
G.f.: 4*x^3*(13 + 5*x) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)
E.g.f.: 4*(exp(x)*(28 - 23*x + 9*x^2) - 28 - 5*x). - Stefano Spezia, Aug 14 2022