Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A161135
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A161135 Trianular 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 1st, 2nd, ..., nth, 1st, 2nd, ... pile. +0
4
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, 232, 1, 4, 45, 181, 384, 511, 747, 748, 1, 8, 22, 214, 613, 1097, 183, 931, 932, 1, 18, 28, 54, 373, 837, 993, 1931, 2864, 2865, 1, 6, 141, 591, 1642, 3211, 8451, 1836, 14891 (list; graph; listen)
OFFSET

1,3

COMMENT

Formatted as a triangular array:

m=1: 1

m=2: 1, 2

m=3: 1, 4, 5

m=4: 1, 3, 8, 9

m=5: 1, 6, 24, 36, 37

m=6: 1, 10, 9, 47, 85, 86

m=7: 1, 12, 55, 125, 144, 231, 232

m=8: 1, 4, 45, 181, 384, 511, 747, 748

m=9: 1, 8, 22, 214, 613, 1097, 183, 931, 932

m=10: 1, 18, 28, 54, 373, 837, 993, 1931, 2864, 2865

m=11: 1, 6, 141, 591, 1642, 3211, 8451, 1836, 14891, 17760, 17761

m=12: 1, 11, 47, 206, 964, 3274, 14079, 14738, 55459, 92010, 109779, 109780

FORMULA

T(m,2)=A002326(m-1); T(m,m)=T(m,m-1)+1

EXAMPLE

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.

PROGRAM

(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 }

CROSSREFS

A002326 (second column), A161136 (the total number of tossed cards)

Sequence in context: A145861 A129874 A021983 this_sequence A038730 A050166 A124959

Adjacent sequences: A161132 A161133 A161134 this_sequence A161136 A161137 A161138

KEYWORD

nonn,tabf

AUTHOR

Max Alekseyev (maxale(AT)gmail.com), Jun 02 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 8 08:31 EST 2009. Contains 170430 sequences.


AT&T Labs Research