login
A002139
Shuffling 2n cards.
(Formerly M0737 N0276)
1
2, 3, 5, 12, 14, 11, 13, 20, 72, 19, 42, 132, 84, 114, 29, 30, 110, 156, 37, 156, 420, 210, 156, 552, 462, 72, 53, 420, 342, 59, 61, 42, 156, 67, 506, 1260, 90, 420, 930, 1560, 990, 83, 72, 812, 132, 156, 110, 1332, 2352, 930, 101, 2652, 156
OFFSET
1,1
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
S. W. Golomb, Permutations by cutting and shuffling, SIAM Rev., 3 (1961), 293-297.
FORMULA
a(n) = (f(n)+1) * phi(p^(k-1)) if 2 is primitive mod 2n-1 in which case necessarily 2n-1=p^k, p prime; otherwise, a(n) = lcm(f(n), f(n)+1), where f(n) = A002326(n-1). - Sean A. Irvine, Jul 17 2013
MATHEMATICA
f[n_] := MultiplicativeOrder[2, 2*n-1]; a[n_] := If[f[n] == EulerPhi[2*n-1], {p, k} = FactorInteger[2*n-1] // First; (f[n]+1)*EulerPhi[p^(k-1)], LCM[f[n], f[n]+1]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 06 2014, after Sean A. Irvine *)
CROSSREFS
Cf. A002326.
Sequence in context: A158936 A271227 A293696 * A140489 A331101 A193776
KEYWORD
nonn,nice
EXTENSIONS
More terms from Sean A. Irvine, Jul 17 2013
STATUS
approved