OFFSET
1,2
COMMENTS
Former name: a(n) = leftmost term of M^n * [1,0,0,0,0,0] where M is the 6 X 6 matrix [1,2,3,4,5,6; 2,3,1,5,6,4; 3,1,2,6,4,5; 4,6,5,1,3,2; 5,4,6,2,1,3; 6,5,4,3,2,1].
M is a multiplication table for the symmetric group of degree 3 (S_3).
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (9,225,567).
FORMULA
G.f.: x*(1 +82*x +366*x^2 -189*x^3)/((1+3*x)*(1+9*x)*(1-21*x)). - Colin Barker, Dec 13 2012
From G. C. Greubel, Nov 14 2022: (Start)
a(n) = (9*(21)^n + 9*(-9)^n + 24*(-3)^n + 18*[n=1] - 42*[n=0])/54.
E.g.f.: (1/54)*(-42 + 18*x + 24*exp(-3*x) + 9*exp(-9*x) + 9*exp(21*x)). (End)
MATHEMATICA
LinearRecurrence[{9, 225, 567}, {1, 91, 1410, 33543}, 20] (* Harvey P. Dale, Apr 11 2018 *)
M= {{1, 2, 3, 4, 5, 6}, {2, 3, 1, 5, 6, 4}, {3, 1, 2, 6, 4, 5}, {4, 6, 5, 1, 3, 2}, {5, 4, 6, 2, 1, 3}, {6, 5, 4, 3, 2, 1}};
Table[A120756[n], {n, 30}] (* G. C. Greubel, Nov 14 2022 *)
PROG
(Magma) I:=[91, 1410, 33543]; [1] cat [n le 3 select I[n] else 9*Self(n-1) + 225*Self(n-2) +567*Self(n-3): n in [1..31]]; // G. C. Greubel, Nov 14 2022
(SageMath)
def A120756(n): return (9*(21)^n +9*(-9)^n +24*(-3)^n +18*int(n==1) -42*int(n==0))/54
[A120756(n) for n in range(1, 30)] # G. C. Greubel, Nov 14 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson and Roger L. Bagula, Jul 01 2006
EXTENSIONS
Edited by N. J. A. Sloane, May 06 2010
Name changed by G. C. Greubel, Nov 14 2022
STATUS
approved