OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
a(3) = 8 because we have: 012, 021, 102, 111, 120, 201, 210, 222.
MAPLE
a:= proc(n) option remember; `if`(n<6, [1, 2, 6, 8, 38, 102][n+1],
((n-1)^2*(380713*n^2-2450435*n+3831534) *a(n-1)
-3*(n-2)^2*(230459*n^2-1671772*n+2280969) *a(n-2)
-(811908*n^4-11125602*n^3+47672874*n^2-84737610*n+54621270) *a(n-3)
-27*(n-2)*(n-3)*(380713*n^2-2450435*n+3831534) *a(n-4)
+81*(n-3)*(n-4)*(230459*n^2-1671772*n+2280969) *a(n-5)
+243*(n-3)*(n-4)*(n-5)*(120233*n-220828) *a(n-6)) /
(n^2*(n-1)*(10007*n+17779)))
end:
seq(a(n), n=0..40); # Alois P. Heinz, Jan 05 2014
MATHEMATICA
Table[2Sum[Multinomial[k, k, n-2k], {k, 0, Floor[n/2]}], {n, 0, 30}]-Riffle[Riffle[Table[Multinomial[n, n, n], {n, 0, 10}], 0], 0, 3]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Geoffrey Critzer, Jan 05 2014
STATUS
approved