login
Ordering of a deck of 52 cards after an out-shuffle.
1

%I #14 Jan 27 2021 10:22:17

%S 1,27,2,28,3,29,4,30,5,31,6,32,7,33,8,34,9,35,10,36,11,37,12,38,13,39,

%T 14,40,15,41,16,42,17,43,18,44,19,45,20,46,21,47,22,48,23,49,24,50,25,

%U 51,26,52

%N Ordering of a deck of 52 cards after an out-shuffle.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RiffleShuffle.html">Riffle Shuffle</a>.

%t Riffle[Range[26],Range[27,52]] (* _Harvey P. Dale_, Aug 17 2017 *)

%o (Python)

%o def out_shuffle(deck):

%o shuffle = [i for i in range(len(deck))]

%o shuffle[0::2] = deck[:(len(deck)+1)//2]

%o shuffle[1::2] = deck[(len(deck)+1)//2:]

%o return shuffle

%o print(out_shuffle(range(1, 53))) # _Michael S. Branicky_, Jan 27 2021

%Y Cf. A059952.

%K nonn,easy,fini,full

%O 1,2

%A _Eric W. Weisstein_