

A161173


a(n) is the order (or period) of the "Cat's" permutation applied to a list of n objects.


2



1, 1, 3, 4, 2, 4, 6, 10, 6, 10, 14, 12, 30, 36, 24, 14, 12, 56, 18, 66, 10, 60, 14, 110, 198, 126, 48, 133, 210, 78, 105, 18, 18, 110, 660, 396, 93, 552, 120, 616, 276, 345, 43, 108, 1122, 204, 702, 1904, 138, 598, 2310, 1080, 132, 330
(list;
graph;
refs;
listen;
history;
text;
internal format)



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+1i\2, P((n+1)\2, (n+1)\2i\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

Cf. A161172.
Sequence in context: A174531 A021296 A323100 * A210875 A238373 A078069
Adjacent sequences: A161170 A161171 A161172 * A161174 A161175 A161176


KEYWORD

nonn


AUTHOR

Colm Mulcahy, Jun 04 2009, Jun 07 2009


EXTENSIONS

Some terms corrected by Andrew Howroyd, Apr 28 2020


STATUS

approved



