OFFSET
0,5
COMMENTS
6*a(n) is the number of strings of length n defined on {0, 1, 2, 3} that contain one or two 0's, one or two 1's, one or two 2's and there are no restrictions on the number of 3's.
For n >= 6, also the number of induced cubes in the n-tetrahedral (Johnson) graph. - Eric W. Weisstein, Mar 14 2026
LINKS
Eric Weisstein's World of Mathematics, Cube Polynomial.
Eric Weisstein's World of Mathematics, Tetrahedral Johnson Graph.
Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
FORMULA
E.g.f.: (exp(x)/6)*(x + x^2/2)^3.
G.f.: x^3*(1 + 3*x+ 6*x^2 + 5*x^3)/(1 - x)^7. - Stefano Spezia, Mar 15 2025
a(n) = 7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Eric W. Weisstein, Mar 14 2026
EXAMPLE
6*a(4) = 60 since the strings are the 12 permutations of 0012, the 12 permutations of 0112, the 12 permutations of 0122, and the 24 permutations of 0123.
MATHEMATICA
a[n_] := Total[{1, 6, 15, 15} Binomial[n, {3, 4, 5, 6}]]; Array[a, 36, 0] (* Amiram Eldar, Mar 15 2025 *)
Table[{1, 6, 15, 15} . Binomial[n, Range[3, 6]], {n, 0, 20}] (* Eric W. Weisstein, Mar 14 2026 *)
Table[(n - 2) (n - 1) n (n^3 - 6 n^2 + 17 n - 16)/48, {n, 0, 10}] (* Eric W. Weisstein, Mar 14 2026 *)
LinearRecurrence[{7, -21, 35, -35, 21, -7, 1}, {0, 0, 1, 10, 55, 215, 665}, {0, 20}] (* Eric W. Weisstein, Mar 14 2026 *)
CoefficientList[Series[-(x^3 (1 + 3 x + 6 x^2 + 5 x^3)/(-1 + x)^7), {x, 0, 20}], x] (* Eric W. Weisstein, Mar 14 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Mar 15 2025
STATUS
approved
