A215593 Number of permutations of n indistinguishable copies of 1..7 with every partial sum <= the same partial sum averaged over all permutations.
1, 1001, 71892912, 13126885205000, 3627155158988429250, 1267664556730792079292048, 515544601327354412382720479328, 233099041543988273824859604028713600, 113972303622279852972722869873689584148750, 59182016901859077504525075283397206729638923750
Offset: 0
Keywords
Examples
a(1) = 1001: (1,2,3,4,5,6,7), (1,2,3,4,5,7,6), ..., (4,3,5,2,1,7,6), (4,3,5,2,6,1,7).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..11
Crossrefs
Row n=7 of A215561.
Programs
-
Maple
b:= proc(x, y, z, u, v, w, h) option remember; local n, g; n:= x+y+z+u+v+w+h; g:= x+2*y+3*z+4*u+5*v+6*w+7*h -8*(n-1)/2; `if`(n<2, 1, `if`(x>0 and 1<=g, b(x-1, y, z, u, v, w, h), 0)+ `if`(y>0 and 2<=g, b(x, y-1, z, u, v, w, h), 0)+ `if`(z>0 and 3<=g, b(x, y, z-1, u, v, w, h), 0)+ `if`(u>0 and 4<=g, b(x, y, z, u-1, v, w, h), 0)+ `if`(v>0 and 5<=g, b(x, y, z, u, v-1, w, h), 0)+ `if`(w>0 and 6<=g, b(x, y, z, u, v, w-1, h), 0)+ `if`(h>0 and 7<=g, b(x, y, z, u, v, w, h-1), 0)) end: a:= n-> b(n$7): seq(a(n), n=0..4);