an old question that I know, but it is strange that no one put the actual solution to mathematics.
countrifflecards[deck_] := Module[{n = Length@deck , ct, rifdeck}, ct = 0; rifdeck = Riffle @@ Partition[
This handles even and odd cases:
countrifflecards[RandomSample[ Range[
{1, 2, 4, 3, 6, 10, 12, 4, 8, 18, 6, 11, 20, 18, 28, 5, 10, 12, 36, 12, 20, 14, 12, 23, 21 , eight}
countrifflecards[RandomSample[ Range[
{2, 4, 3, 6, 10, 12, 4, 8, 18, 6, 11, 20, 18, 28, 5, 10, 12, 36, 12, 20, 14, 12, 23, 21, 8 , 52}
You can easily show if you added a card in an odd case, an additional card will remain at the bottom, and will not change the sequence, so the result of an odd case is only the result of n+1 .
ListPlot[{
