OFFSET
1,3
COMMENTS
The Cat's permutation is done as follows. Start with a packet of n cards (numbered 1 to n from top to bottom), and deal them into two piles, first to yourself (pile B), and then to a spectator (pile A), saying "Me, you," silently to yourself over and over. Pick up pile B and deal again, first to yourself, forming a new pile B, and then to the spectator, thereby adding to the existing pile A. Repeat, picking up the diminished pile B, and dealing "Me, you" as before. Eventually, just one card remains in pile B; place it on top of pile A. The sequence of the cards in pile A determines the Cat's permutation ("Me, you" said fast sounds like something a cat says).
Values for n = 4, 19 and 27 given in the 'period' column of the table for the Cat's deal in the Colm Mulachy link are incorrect. However, the corresponding cycle decompositions are correct. - Andrew Howroyd, Apr 28 2020
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..2048
Colm Mulcahy, The Yummie Deal and Variations, Card Colm, MAA Online, April 2009.
EXAMPLE
a(9) = 6, because when the Cat's permutation is applied to {1,2,3,4,5,6,7,8,9} we get {9,1,5,3,7,8,6,4,2}, which corresponds to the product of a disjoint six cycle and a three cycle, and hence has order lcm(6,3)=6.
PROG
(PARI)
P(n, i)={if(n==1, 1, if(i%2==0, n+1-i\2, P((n+1)\2, (n+1)\2-i\2)))}
Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
Cycles(n)={my(L=List()); for(i=1, n, my(k=Follow(i, j->P(n, j))); if(k, listput(L, k))); vecsort(Vec(L))}
a(n)={lcm(Cycles(n))} \\ Andrew Howroyd, Apr 28 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Colm Mulcahy, Jun 04 2009, Jun 07 2009
EXTENSIONS
Some terms corrected by Andrew Howroyd, Apr 28 2020
STATUS
approved