login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024222 Number of shuffles (perfect faro shuffles with cut) required to return a deck of size n to its original order. 10

%I #21 Sep 09 2023 20:49:23

%S 0,1,2,2,4,4,3,3,6,6,10,10,12,12,4,4,8,8,18,18,6,6,11,11,20,20,18,18,

%T 28,28,5,5,10,10,12,12,36,36,12,12,20,20,14,14,12,12,23,23,21,21,8,8,

%U 52,52,20,20,18,18,58,58,60,60,6,6,12,12,66,66,22,22,35,35,9,9,20,20

%N Number of shuffles (perfect faro shuffles with cut) required to return a deck of size n to its original order.

%D Martin Gardner, "Card Shuffles," Mathematical Carnival chapter 10, pp. 123-138. New York: Vintage Books, 1977.

%D S. Brent Morris, Magic Tricks, Card Shuffling and Dynamic Computer Memories, Math. Assoc. Am., 1998, p. 107.

%H Tim Folger, <a href="http://suffe.cool/shuffling.html">Shuffling Into Hyperspace</a>, Discover, 1991 (vol. 12, no. 1), pp. 66-67.

%e a(52)=8: a deck of size 52 returns to its original order in 8 perfect faro shuffles.

%p A002326 := proc(n)

%p if n =0 then

%p 1;

%p else

%p numtheory[order](2,2*n+1) ;

%p end if;

%p end proc:

%p A024222 := proc(n)

%p if n <= 1 then

%p n-1 ;

%p else

%p A002326(floor((n-1)/2)) ;

%p end if;

%p end proc: # _R. J. Mathar_, Nov 14 2018

%t A002326 [n_] := If[n == 0, 1, MultiplicativeOrder[2, 2n+1]];

%t A024222[n_] := If[n <= 1 , n-1, A002326[Floor[(n-1)/2]]];

%t Table[A024222[n], {n, 1, 76}] (* _Jean-François Alcover_, May 05 2023, after _R. J. Mathar_ *)

%Y A002326 is really the fundamental sequence for this problem. Cf. A024542.

%K easy,nonn

%O 1,3

%A _Enoch Haga_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)