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.
%I A161135 #7 Jul 12 2012 00:39:50 %S A161135 1,1,2,1,4,5,1,3,8,9,1,6,24,36,37,1,10,9,47,85,86,1,12,55,125,144,231, %T A161135 232,1,4,45,181,384,511,747,748,1,8,22,214,613,1097,183,931,932,1,18, %U A161135 28,54,373,837,993,1931,2864,2865,1,6,141,591,1642,3211,8451,1836,14891 %N A161135 Triangular array T(m,n), 1<=n<=m, giving the minimum positive number of deals of m cards into n piles required to collect all cards in the first pile. Each deal tosses all cards from a pile, the last dealt card indicates a pile to deal next, each deal tosses one card consecutively to the first, 2nd, ..., n-th, first, 2nd, ... pile. %C A161135 Formatted as a triangular array: %C A161135 m=1: 1 %C A161135 m=2: 1, 2 %C A161135 m=3: 1, 4, 5 %C A161135 m=4: 1, 3, 8, 9 %C A161135 m=5: 1, 6, 24, 36, 37 %C A161135 m=6: 1, 10, 9, 47, 85, 86 %C A161135 m=7: 1, 12, 55, 125, 144, 231, 232 %C A161135 m=8: 1, 4, 45, 181, 384, 511, 747, 748 %C A161135 m=9: 1, 8, 22, 214, 613, 1097, 183, 931, 932 %C A161135 m=10: 1, 18, 28, 54, 373, 837, 993, 1931, 2864, 2865 %C A161135 m=11: 1, 6, 141, 591, 1642, 3211, 8451, 1836, 14891, 17760, 17761 %C A161135 m=12: 1, 11, 47, 206, 964, 3274, 14079, 14738, 55459, 92010, 109779, 109780 %F A161135 T(m,2)=A002326(m-1); T(m,m)=T(m,m-1)+1 %e A161135 For m=n=3, deals result in a sequence of configurations (listing number of cards in the piles): %e A161135 3* 0 0 %e A161135 1 1 1* %e A161135 2* 1 0 %e A161135 1 2* 0 %e A161135 2 1* 0 %e A161135 3* 0 0 %e A161135 where * indicate a pile to deal next. The total number of deals here is T(3,3)=5. %o A161135 (PARI) { 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 } %Y A161135 A002326 (second column), A161136 (the total number of tossed cards) %K A161135 nonn,tabf %O A161135 1,3 %A A161135 _Max Alekseyev_, Jun 02 2009