Respectfully, I think this is wrong because the setup is wrong, as it is in other forums in which I've seen it discussed. Your riffle is flawed. In a proper shuffle, the 1st card, say the A of spades (As), and the 52nd card, say the K of diamonds (Kd), should not always stay on the top and the bottom. After all, what's the point of shuffling, but to mix up the cards? So, after the first riffle, when done properly, the original 27the card will be on the top and the original 26th card will be on the bottom, while the As will be second from the top, and the Kd will be second from the bottom. After the second perfect riffle, the As will be fourth from the top, and the Kd will be fourth from the bottom. Third iteration, 8th position, and so on. Done this way, the deck is perfectly reversed on the 26th riffle and back to original order on the 52nd riffle.

I'm not a mathematician and thus cannot formulize this. I wonder if it is expressible mathematically.