Introduction
MatheMagic Card Trick is a fun and simple number-revealing magic trick using math. Generate and print your cards, then read the performance instructions.
How It Works
With three cards, choose a whole number from 1 through 7. The cards contain 1, 3, 5, 7; 2, 3, 6, 7; and 4, 5, 6, 7. Ask which cards contain the number, then add the first number on each of those cards. If it appears on the second and third cards, the total is 2 + 4 = 6.
Each card represents a power of two. Seven cards cover 1 through 127, and ten cover 1 through 1,023. The generator supports up to ten cards.
Web Site
Source Code
MatheMagic source code on GitHub
Credits
Rajiv and Fitz coauthored the JavaScript here that generates the cards. Fitz figured out the generalized algorithmic pattern of numbers to be generated that works for each card and for any number of cards.
Thanks to Vijit Sharma and family for introducing Rajiv and Fitz to this math magic trick.