The party trick, as a trainer. Use every card exactly once to hit the target.
Each level breaks the trick into stages. Stage A: factor the target into primes, no cards. Stage B: build the factors from the cards, factorization shown. Stage C: the full game, target only. Every stage is open from the start; the counts keep score, and hitting a stage's count clears it. Every Stage B and C deal is checked solvable before you see it. Level 3 goes one thousand at a time: nine bands from the 1000s to the 9000s, and clearing a band's Stage C opens the next thousand. Free play (Party, Year, My number) is always open too.
In the video the performer nails a 4-digit number in about 20 seconds. Par here: 60 seconds.
Ace counts 1, and every face card (Jack, Queen, King) counts 10. Every card must be used exactly once.
Tap a number, tap an operation, tap a second number. They combine into one tile, just like calling it out loud. Every step must come out a positive whole number: subtraction stays positive, division must divide exactly.
Stuck, or want to check your answer? The solver searches every combination of the dealt cards and lists what works, simplest first. Search keeps every step at or under 20,000, which covers the performer's style many times over.
This code is this exact deal. Same code, same cards, same target.
Prime factorization, the mental-math way. Every example number is a practice chip: tap one and it loads into the Stage A drill above. When your picked factors multiply to the number, it banks and moves on by itself.
EVEN? → DIGIT SUM? → ENDS IN 5 OR 0? → FAMILIAR POWER? → PERFECT SQUARE? → NEAR A SQUARE? → TEST 7, 11, 13, 17… → STOP AT √REMAINDER
Always test small primes first, in order: 2 → 3 → 5 → 7 → 11 → 13 → 17 → 19 → 23 → … Divide out every 2, then every 3, check 5, then keep going. Repeat each prime until it no longer divides evenly. Stop when the next prime's square exceeds the remaining number; whatever is left over 1 is prime. Don't restart from the original number; keep factoring the smaller remainder.
756 ÷ 2 = 378 · 378 ÷ 2 = 189 · 189 ÷ 9 = 21 · 21 = 3 × 7 → 756 = 2² × 3³ × 7
| 2 | Last digit is even |
| 3 | Digit sum divisible by 3 |
| 4 | Last 2 digits divisible by 4 |
| 5 | Ends in 0 or 5 |
| 6 | Divisible by both 2 and 3 |
| 7 | Remove last digit; subtract 2× that digit from the rest |
| 8 | Last 3 digits divisible by 8 |
| 9 | Digit sum divisible by 9 |
| 10 | Ends in 0 |
| 11 | Alternating sum of digits divisible by 11 |
| 12 | Divisible by both 3 and 4 |
| 13 | Remove last digit; add 4× that digit to the rest |
| 15 | Divisible by both 3 and 5 |
| 17 | Remove last digit; subtract 5× that digit from the rest |
| 19 | Remove last digit; add 2× that digit to the rest |
| 23 | Remove last digit; add 7× that digit to the rest |
| 25 | Ends in 00, 25, 50, or 75 |
| 29 | Remove last digit; add 3× that digit to the rest |
| 31 | Remove last digit; subtract 3× that digit from the rest |
| 37 | Split into 3-digit groups and add; result divisible by 37 |
For the remove-last-digit tests, repeat until the result is small enough to recognize. Negative multiples count too.
7: 203 → 20 − 6 = 14 ✓ · 11: 1331 → 1 − 3 + 3 − 1 = 0 ✓ · 13: 221 → 22 + 4 = 26 ✓ · 17: 391 → 39 − 5 = 34 ✓ · 19: 323 → 32 + 6 = 38 ✓ · 23: 391 → 39 + 7 = 46 ✓ · 29: 203 → 20 + 9 = 29 ✓ · 31: 961 → 96 − 3 = 93 ✓ · 37: 1776 → 1 + 776 = 777 ✓
For most numbers, the 2, 3, 5, 7, 11 and 13 tests are the most useful.
Instead of dividing by one small prime at a time, look for larger familiar factors: 4 (last two digits ÷ 4), 8 (last three ÷ 8), 9 (digit sum ÷ 9), 16, 25 (ends 00/25/50/75), 27, 32, 100 (ends 00), 125. You may divide by composites, but the final answer must contain only primes.
648 ÷ 8 = 81 = 3⁴ → 648 = 2³ × 3⁴ · 675 ÷ 25 = 27 → 675 = 3³ × 5² · 2400 = 24 × 100 → 2400 = 2⁵ × 3 × 5²
Powers of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192
Powers of 3: 3, 9, 27, 81, 243, 729, 2187, 6561
Powers of 5: 5, 25, 125, 625, 3125
Powers of 7: 7, 49, 343, 2401
Also: 11² = 121, 11³ = 1331, 13² = 169, 13³ = 2197, 17² = 289, 17³ = 4913, 19² = 361, 19³ = 6859
4096 = 2¹² · 2187 = 3⁷ · 2401 = 7⁴ · 5000 = 5 × 1000 = 2³ × 5⁴
Recognizing powers avoids many separate division steps.
If the number is a perfect square, factor its square root and double every exponent: N = a² → factor a first.
441 = 21² = (3 × 7)² = 3² × 7² · 2025 = 45² = (3² × 5)² = 3⁴ × 5² · 8281 = 91² = (7 × 13)² = 7² × 13²
Squares worth knowing: 25² = 625, 30² = 900, 35² = 1225, 40² = 1600, 45² = 2025, 50² = 2500, 60² = 3600, 70² = 4900, 75² = 5625, 80² = 6400, 90² = 8100, 95² = 9025
a² − b² = (a − b)(a + b). Look for numbers just below a perfect square. If a number is 1 below an even square, try the consecutive odd numbers on either side of its square root.
143 = 12² − 1² = 11 × 13 · 899 = 30² − 1² = 29 × 31 · 2499 = 50² − 1² = 49 × 51 = 7² × 3 × 17 · 9991 = 100² − 3² = 97 × 103
Immediately look for powers of 5 and factors of 100. If a number ends in 000, factor out 1000 = 2³ × 5³.
1500 = 15 × 100 = 2² × 3 × 5³ · 2500 = 50² = 2² × 5⁴ · 3375 = 27 × 125 = 3³ × 5³ · 5625 = 75² = 3² × 5⁴
2-digit (10–99): only check 2, 3, 5 and 7 for primality. Example: 91 = 7 × 13.
3-digit (100–999): to test whether the number is prime, test primes through 31, only while their squares are ≤ the number. Example: 667 = 23 × 29.
4-digit (1000–9999): strip 2, 3 and 5 first; check 7, 11, 13; look for recognizable products and perfect squares; look for differences of squares near 100², 90², etc.; continue with larger primes only when necessary; stop when the next prime squared exceeds the remaining number. The stopping rule is your biggest time saver.
For numbers up to 9999 you never test a divisor above 97, because √9999 is just under 100. The primes up to 100:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
| Remainder below 49 | check primes through 5 |
| below 121 | through 7 |
| below 169 | through 11 |
| below 289 | through 13 |
| below 361 | through 17 |
| below 529 | through 19 |
| below 841 | through 23 |
| below 961 | through 29 |
| below 1369 | through 31 |
General rule: once the next untested prime squared is greater than your remaining number, that remainder is prime. You usually need far fewer tests than the full list.
1001 ÷ 7 = 143 = 11 × 13 → 7 × 11 × 13
1729: digit sum 19, not ÷3 · ÷ 7 = 247 = 13 × 19 → 7 × 13 × 19
2025 = 45², 45 = 3² × 5 → 3⁴ × 5²
4096: recognize the power of 2 → 2¹²
6930 = 693 × 10, 693 = 3² × 7 × 11 → 2 × 3² × 5 × 7 × 11
8281 = 91², 91 = 7 × 13 → 7² × 13²
9991 = 100² − 3² → 97 × 103
9999: digit sum 36, ÷ 9 = 1111 = 11 × 101 → 3² × 11 × 101
Golden rule: don't memorize every possible factorization. Memorize a small set of patterns that lets you generate factorization answers quickly.
A performer in a bar is handed a target: first the current year, made from 8 random cards, then a stranger's favourite 4-digit number, 6,843, made from 9 random cards. He uses every card exactly once, combining them with + − × ÷ out loud, and lands exactly on the number. Watch it: Alex Cohen's post, "Most impressive thing I've ever seen".
His year run, card values 13 12 11 10 9 7 5 5:
His 6,843 run, card values 6 4 12 10 10 8 11 7 3:
Why it almost always works: nine cards give you so many combinations that essentially every 4-digit number is reachable. The skill is not whether a solution exists. It is finding one fast, in your head, while people watch.
His moves, so you can steal them:
Rules used by this trainer: ace counts 1, every face card counts 10; every card exactly once; each step a positive whole number. In the video he counts Jack 11, Queen 12, King 13, which is why his spoken steps name those numbers.
Training in Train mode: each digit level (2-digit from 5 cards, 3-digit from 7, 4-digit from 8, Party at the top) breaks the trick into stages you can play piecemeal. Stage A is factoring alone: produce the target's prime factorization, 8 clean ones to clear the stage. Stage B shows the factorization and has you build each factor from the cards, parking leftovers as 1s: 3 completed builds. Stage C is the full game, target only: 5 clean solves, no peeking, climbs to the next level. Each stage carries one line of instruction at the top; the drills are the teaching.