OFFSET
1,3
COMMENTS
From Andrew Howroyd, Nov 11 2017:(Start)
The shuffling process is the same as the 'deal one, skip one' method described in A289386 except that dealt cards are placed face up. With this variation the first card always remains the first card.
Equivalently, place the numbers 1..n-1 on a circle and cyclically mark the 2nd unmarked number until all numbers are marked. The sequence in which the numbers are marked defines a permutation. The order of this permutation is a(n). The numbers 1..n can also be used, but in that case the number 1 should be marked first.
(End)
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..2000
Gary Antonick, The Polka Dot Puzzle, NY Times Wordplay blog.
FORMULA
a(2^n+1) = n+1. - Ripatti A. (ripatti(AT)inbox.ru), Feb 04 2010
EXAMPLE
From Andrew Howroyd, Nov 11 2017: (Start)
a(6) = 5 because it takes 5 rounds of shuffling to return the cards to their original order as illustrated below:
1 2 3 4 5 6
1 3 5 2 6 4
1 5 6 3 4 2
1 6 4 5 2 3
1 4 2 6 3 5
1 2 3 4 5 6
(End)
PROG
(PARI)
P(n, i)={my(d=2*n+1-2*i); while(d<n, d*=2); 2*n-d}
Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
CyclePoly(n, x)={my(q=0); for(i=1, n, my(l=Follow(i, j->P(n, j))); if(l, q+=x^l)); q}
a(n)={my(q=CyclePoly(n, x), m=1); for(i=1, poldegree(q), if(polcoeff(q, i), m=lcm(m, i))); m} \\ Andrew Howroyd, Nov 11 2017
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Marie-Christine Haton (Marie-Christine.Haton(AT)loria.fr)
EXTENSIONS
Name clarified by Andrew Howroyd, Nov 11 2017
STATUS
approved