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.

A274305 Order of shuffle group generated by in- and out-horseshoe shuffles of a deck of 2n cards.

This page as a plain text file.
%I A274305 #20 Nov 30 2017 08:04:39
%S A274305 2,12,120,32,3628800,95040,87178291200,80,6402373705728000,
%T A274305 1216451004088320000,1124000727777607680000,310224200866619719680000,
%U A274305 403291461126605635584000000,152444172305856930250752000000,265252859812191058636308480000000,192,295232799039604140847618609643520000000
%N A274305 Order of shuffle group generated by in- and out-horseshoe shuffles of a deck of 2n cards.
%H A274305 Jean-François Alcover, <a href="/A274305/b274305.txt">Table of n, a(n) for n = 1..64</a>
%H A274305 Steve Butler, Persi Diaconis and R. L. Graham, <a href="https://arxiv.org/abs/1412.8533">The mathematics of the flip and horseshoe shuffles</a>, arXiv:1412.8533 [math.CO], 2014.
%H A274305 Steve Butler, Persi Diaconis and R. L. Graham, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.123.6.542">The mathematics of the flip and horseshoe shuffles</a>, The American Mathematical Monthly 123.6 (2016): 542-556.
%F A274305 See Maple program.
%p A274305 f:=proc(n) local k,i,np;
%p A274305 if n=1 then 2
%p A274305 elif n=2 then 12
%p A274305 elif n=3 then 120
%p A274305 elif n=6 then 12!/7!
%p A274305 elif (n mod 2) = 1 then (2*n)!
%p A274305 else
%p A274305 np:=n; k:=1;
%p A274305 for i while (np mod 2) = 0 do
%p A274305    np:=np/2; k:=k+1; od;
%p A274305    if (n=2^(k-1)) then (k+1)*2^k else (2*n)!/2; fi;
%p A274305 fi;
%p A274305 end;
%p A274305 [seq(f(n),n=1..64)];
%t A274305 a[n_] := Which[n == 1, 2, n == 2, 12, n == 3, 120, n == 6, 12!/7!, OddQ[n], (2 n)!, True, np = n; k = 1; While[EvenQ[np], np = np/2; k++]; If[n == 2^(k - 1), (k + 1)*2^k, (2n)!/2]];
%t A274305 Array[a, 17] (* _Jean-François Alcover_, Nov 30 2017, from Maple *)
%Y A274305 Cf. A007346, A002326.
%K A274305 nonn
%O A274305 1,1
%A A274305 _N. J. A. Sloane_, Jun 20 2016