OFFSET
8,1
COMMENTS
Also the number of ballot sequences of length n such that the multiplicities of the largest and the smallest value differ by 6.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 8..100
MAPLE
h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n) end:
g:= proc(n, i, l) local j; `if`(n=0 or i<1, 0, `if`(l<>[] and
l[1]-i=6, `if`(irem(n, i, 'j')=0, h([l[], i$j]), 0),
add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i)))
end:
a:= n-> g(n$2, []):
seq(a(n), n=8..35);
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt and Alois P. Heinz, Jun 25 2014
STATUS
approved