cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A048782 Smallest positive number of "triangular" shuffles of n(n+1)/2 cards needed to restore them to their original order.

This page as a plain text file.
%I A048782 #10 Nov 13 2017 03:03:37
%S A048782 1,1,2,6,10,84,70,24,36,330,210,288,1428,252,10080,13680,1260,19320,
%T A048782 2160,22440,1692152,50400,140760,3071880,284088,608753236,617760,
%U A048782 15600,35287560,214138080,30240,1866600,58333800,8637552,4034916600
%N A048782 Smallest positive number of "triangular" shuffles of n(n+1)/2 cards needed to restore them to their original order.
%C A048782 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.
%H A048782 Andrew Howroyd, <a href="/A048782/b048782.txt">Table of n, a(n) for n = 1..500</a>
%e A048782 For n=3, successive shuffles give:
%e A048782 1.......1.......1
%e A048782 2.3.....2.4.....2.3
%e A048782 4.5.6...3.5.6...4.5.6,
%e A048782 returning the deck of 6 cards to its original order in 2 shuffles. Thus a(3)=2.
%o A048782 (PARI)
%o A048782 Perm(n)={concat(vector(n, i, vectorsmall(i, j, i+n*(j-1)-j*(j-1)/2)))}
%o A048782 Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
%o A048782 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}
%o A048782 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
%Y A048782 Cf. A121052, A122158.
%K A048782 nonn
%O A048782 1,3
%A A048782 _John W. Layman_, Jul 14 1999, Aug 22 2006
%E A048782 Edited by _R. J. Mathar_, Aug 02 2008