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
Alois P. Heinz, Table of n, a(n) for n = 1..5000
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
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Sean A. Irvine, Jul 17 2013
STATUS
approved