Card Trick by Berryman, John Douglas
 is a Project Gutenberg book, now on Github.