A161138 Main diagonal of the triangular array A161136.
1, 3, 9, 18, 80, 196, 554, 1824, 2292, 7218, 45522, 288135, 660113, 3201130, 10512530, 17675063, 191230544, 207521990
Offset: 1
Formula
a(m) = A161136(m,m).
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
For m=n=3, deals result in a sequence of configurations (listing number of cards in the piles): 3* 0 0 1 1 1* 2* 1 0 1 2* 0 2 1* 0 3* 0 0 where * indicate a pile to deal next. The total number of deals here is T(3,3)=5.
{ T(m,n) = local(v,r,k,t); v=vector(n); v[1]=m; r=0; k=1; until( vecmax(v)==m, r++; t=v[k]; v[k]=0; k=0; while(t, k++; if(k>n, k=1); v[k]++; t--) ); r }
Comments