OFFSET
1,3
REFERENCES
Martin Gardner, "Card Shuffles," Mathematical Carnival chapter 10, pp. 123-138. New York: Vintage Books, 1977.
S. Brent Morris, Magic Tricks, Card Shuffling and Dynamic Computer Memories, Math. Assoc. Am., 1998, p. 107.
LINKS
Tim Folger, Shuffling Into Hyperspace, Discover, 1991 (vol. 12, no. 1), pp. 66-67.
Roger K. W. Hui, Sixteen APL Amuse-Bouches, Vector (2016) Vol. 26, No. 4, 54-66. Art No. 10501480.
EXAMPLE
a(52)=8: a deck of size 52 returns to its original order in 8 perfect faro shuffles.
MAPLE
A002326 := proc(n)
if n =0 then
1;
else
numtheory[order](2, 2*n+1) ;
end if;
end proc:
A024222 := proc(n)
if n <= 1 then
n-1 ;
else
A002326(floor((n-1)/2)) ;
end if;
end proc: # R. J. Mathar, Nov 14 2018
MATHEMATICA
A002326 [n_] := If[n == 0, 1, MultiplicativeOrder[2, 2n+1]];
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved