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.
%I A007346 M1909 #43 Jul 10 2021 06:58:20 %S A007346 2,8,24,24,1920,7680,322560,64,92897280,3715891200,40874803200, %T A007346 194641920,25505877196800,1428329123020800,21424936845312000,160, %U A007346 23310331287699456000,1678343852714360832000,31888533201572855808000 %N A007346 Order of group generated by perfect shuffles of 2n cards. %D A007346 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007346 Vincenzo Librandi, <a href="/A007346/b007346.txt">Table of n, a(n) for n = 1..200</a> %H A007346 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 A007346 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. %H A007346 P. Diaconis, R. L. Graham and W. M. Kantor, <a href="http://dx.doi.org/10.1016/0196-8858(83)90009-X">The mathematics of perfect shuffles</a>, Adv. Appl. Math. 4 (2) (1983) 175-196. %H A007346 <a href="/index/Gre#groups">Index entries for sequences related to groups</a> %F A007346 See Maple program. - _N. J. A. Sloane_, Jun 20 2016 %p A007346 f:=proc(n) local k,i,np; %p A007346 if n=1 then 2 %p A007346 elif (n mod 2) = 1 then n!*2^(n-1) %p A007346 elif n=6 then 2^9*3*5 %p A007346 elif n=12 then 2^17*3^3*5*11 %p A007346 elif n=2 then 8 %p A007346 elif (n mod 4)=2 then n!*2^n %p A007346 else %p A007346 np:=n; k:=1; %p A007346 for i while (np mod 2) = 0 do %p A007346 np:=np/2; k:=k+1; od; %p A007346 if (n=2^(k-1)) then k*2^k else n!*2^(n-2); fi; %p A007346 fi; %p A007346 end; %p A007346 [seq(f(n),n=1..64)]; # _N. J. A. Sloane_, Jun 20 2016 %t A007346 a[1] = 2; a[2] = 8; a[n_] := With[{m = 2^n*n!}, Which[Mod[n, 4] == 2, If[n == 6, m/6, m], Mod[n, 4] == 1, m/2, Mod[n, 4] == 3, m/2, True, If[n == 2^IntegerExponent[n, 2], 2*n*(IntegerExponent[n, 2] + 1), If[n == 12, m/(2*7!), m/4]]]]; Table[a[n], {n, 1, 19}](* _Jean-François Alcover_, Feb 17 2012, after _Franklin T. Adams-Watters_ *) %o A007346 (PARI) A007346(n) = local(M); M=2^n*n!; if(n%4==2, if(n==2, 8, if(n==6, M/6, M)), if(n%4==1, if(n==1, 2, M/2), if(n%4==3, M/2, if(n==2^valuation(n, 2), 2*n*(valuation(n, 2)+1), if(n==12, M/(7!*2), M/4))))) \\ _Franklin T. Adams-Watters_, Nov 30 2006 %Y A007346 Cf. A002326, A024222, A274299. %Y A007346 Bisections give A002671, A274303. %K A007346 nonn,nice,easy %O A007346 1,1 %A A007346 _N. J. A. Sloane_, _Mira Bernstein_ %E A007346 Corrected and extended by _Franklin T. Adams-Watters_, Nov 30 2006