OFFSET
0,5
COMMENTS
All terms 3 mod 10 end in 1, all terms 8 mod 10 end in 6 and vice versa. - Jon Perry, Oct 29 2014
Also the number of inequivalent ways to color the corners of an octahedron using at most n colors so that no two adjacent corners have the same color. - David Nacin, Feb 22 2017
LINKS
Marko R. Riedel, Proper colorings of the cube, Mathematics Stack Exchange, Oct 29 2014
Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
FORMULA
a(n) = ( n*(n-1)*(n-2)*(n^3-9*n^2+29*n-32) + 3*n*(n-1)*(n-2)^2 )/24 = (n-2)*(n-1)*n*(n^3-9*n^2+32*n-38)/24.
G.f.: x^3*(1+3*x+6*x^2+20*x^3)/(1-x)^7. - Vincenzo Librandi, Oct 30 2014
EXAMPLE
For n = 3 we see there is only a(3) = 1 way to color the faces of a cube with three colors so that no two adjacent sides have the same color. - David Nacin, Feb 22 2017
MAPLE
q := N -> 1/24*(N*(N-1)*(N-2)*(N^3-9*N^2+29*N-32) + 3*N*(N-1)*(N-2)^2);
MATHEMATICA
Table[(n - 2) (n - 1) n (n^3 - 9 n^2 + 32 n - 38)/24, {n, 0, 30}] (* Bruno Berselli, Oct 30 2014 *)
CoefficientList[Series[x^3 (1 + 3 x + 6 x^2 + 20 x^3)/(1 - x)^7, {x, 0, 30}], x] (* Vincenzo Librandi, Oct 30 2014 *)
PROG
(Magma) [(n-2)*(n-1)*n*(n^3-9*n^2+32*n-38)/24: n in [0..30]]; // Vincenzo Librandi, Oct 30 2014
(PARI) a(n)=(n-2)*(n-1)*n*(n^3-9*n^2+32*n-38)/24 \\ Charles R Greathouse IV, Feb 23 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Marko Riedel, Oct 29 2014
STATUS
approved