Here's a machine. You feed it a number, it spits one back:
2 → 7
3 → 10
4 → 13
What's it doing in there?
Most kids get it within a minute or so: multiply by 3, then add 1. What's interesting isn't the arithmetic — it's what the kid just did. They looked at the behavior of a system they couldn't see inside, guessed at the mechanism, and checked the guess against every clue. That's reverse engineering, and it's also most of what algebra actually is before anybody writes down y = 3x + 1.
I built a workbook around that idea. It's called Math Thinkers: The Secret Machine Lab, it's free, and it's a PDF you can print.
The machines get stranger as you go. Students work backward from an output to figure out what input must have gone in. They handle two-step machines where the order of operations matters — and then get asked why it matters. They find broken clues that don't fit and have to decide whether the clue is wrong or the rule is. They compare two rules that both look plausible. They chain machines together. They chase sequences. By the end they're inventing their own puzzles, which is a much harder problem than solving one.
The part I'm most attached to: sometimes there is genuinely no unique answer. Two rules fit all the evidence given, and the honest response isn't to guess which one the worksheet author wanted — it's to notice the ambiguity and ask, what new input would tell these two apart? Kids are rarely asked that. It's the question real mathematicians and scientists live inside. A worksheet that always has exactly one findable answer quietly teaches that thinking is about mind-reading the adult who wrote it, and I wanted to avoid that.
So the habits underneath: spotting patterns, forming a hypothesis, testing it against every case rather than the convenient ones, reasoning backward, stating a rule precisely enough that someone
else could run it, and knowing what evidence you're still missing. That's mathematics as reverse engineering — the child sees what a mysterious system does and tries to infer what must be happening inside it.
The finished thing is 33 pages, 98 prompts and challenges, with a complete answer key and a Pattern Detective certificate at the end. It's built around fourth-grade math, though curious third graders and bored sixth graders seem to do fine with it. It is not a curriculum — it's a focused set of brainteasers and mini-labs about one very good idea.
Download the PDF, print it, and try three or four puzzles with a kid. Watch what they do when the clues don't quite pin it down.

