Originally posted by Mephisto2Doh! I was assuming that the number of cards in the two piles had to be equal. Nice one.
What if you take 13 cards in one pile, and then turn them all over? The remaining 39 are left as they are. That should do the job.
edit. if x= the number of cards with face 'up' among the 13 chosen, then
pile of 13: x (Up) + (13-x) (Down)
pile of 39: (13-x) Up + (26+x) (Down)
turn the 13 over, leaves: x (Down) + (13-x) (Up)