OFFSET
1,3
COMMENTS
Lay out cards in a triangular array from left to right in rows with 1 card in row 1 (the top row), 2 cards in row 2, etc., then pick up by columns, in order from the top of the column to the bottom, first from column 1, then column 2, etc. See A122158 for analogous results for a different triangular shuffle.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
EXAMPLE
For n=3, successive shuffles give:
1.......1.......1
2.3.....2.4.....2.3
4.5.6...3.5.6...4.5.6,
returning the deck of 6 cards to its original order in 2 shuffles. Thus a(3)=2.
PROG
(PARI)
Perm(n)={concat(vector(n, i, vectorsmall(i, j, i+n*(j-1)-j*(j-1)/2)))}
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(v=Perm(n), q=0); for(i=1, #v, my(l=Follow(i, j->v[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 12 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Jul 14 1999, Aug 22 2006
EXTENSIONS
Edited by R. J. Mathar, Aug 02 2008
STATUS
approved