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.

A007346 Order of group generated by perfect shuffles of 2n cards.

Original entry on oeis.org

2, 8, 24, 24, 1920, 7680, 322560, 64, 92897280, 3715891200, 40874803200, 194641920, 25505877196800, 1428329123020800, 21424936845312000, 160, 23310331287699456000, 1678343852714360832000, 31888533201572855808000
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections give A002671, A274303.

Programs

  • Maple
    f:=proc(n) local k,i,np;
    if n=1 then 2
    elif (n mod 2) = 1 then n!*2^(n-1)
    elif n=6 then 2^9*3*5
    elif n=12 then 2^17*3^3*5*11
    elif n=2 then 8
    elif (n mod 4)=2 then n!*2^n
    else
    np:=n; k:=1;
    for i while (np mod 2) = 0 do
       np:=np/2; k:=k+1; od;
       if (n=2^(k-1)) then k*2^k else n!*2^(n-2); fi;
    fi;
    end;
    [seq(f(n),n=1..64)]; # N. J. A. Sloane, Jun 20 2016
  • Mathematica
    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 *)
  • 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

Formula

See Maple program. - N. J. A. Sloane, Jun 20 2016

Extensions

Corrected and extended by Franklin T. Adams-Watters, Nov 30 2006