I think it's a bit more obvious than Juho's making it.

I think it's reasonably straightforward that the formula is (a+3b+9c). To
see this, notice that groups of three cards end up in the same place in the
second deal, and groups of nine cards in the third deal. Or just try out
some values:

n = 15
card  1 2 3 4 5 6 7 8 9101112131415
   a  1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
   b  3 3 3 1 1 1 2 2 2 3 3 3 1 1 1
   c  1 1 1 2 2 2 2 2 2 2 2 2 3 3 3

Once you've got that far, you've got a period 27 pattern, and the only
question is the offset. The key here is that the middle card always gets
(2, 2, 2), and then you can quickly calculate that the offset is the
(n/2-27) stuff.

Of course, in real life it takes a bit of staring at patterns before this is
as 'obvious' as I've made it sound.

-----------

To answer Riley's original question, I'd wondered about that too. I
concluded that the 27 is kind of just how the maths worked out, but I think
it's a bit deeper than that too, because it's the length of the pattern. But
I can't express very clearly why it must be 27.

The nearest I can get is to suppose that the rows in the trick were labelled
(-1,0,1) instead of (1,2,3), and that the cards were zero-indexed around the
middle card. Then the offset in the formula would always be zero. Our
situation differs from that by half the number of cards, n/2, because of the
card labelling, and half a pattern period, 27/2, if the row labelling were
the sensible (0,1,2); and actually another 27/2 because we have a one-based
row labelling instead of a zero-based one.

Maybe someone else can shed some more intuition here.

-- 
Stephen Turner, Cambridge, UK    http://homepage.ntlworld.com/adelie/stephen/
"The internet is a reflection of our society. If we do not like what we see,
 the problem is not to fix the mirror, we have to fix society." (Vint Cerf)

Reply via email to