One string of digits secretly contains every possible 4-digit code
To test all 10,000 four-digit PIN codes one at a time, you'd expect to need 40,000 digits. Is there a shorter string of digits that still contains every single one of those 10,000 codes somewhere inside it?
Reveal the answer
Yes — just 10,000 cyclic digits. A de Bruijn sequence overlaps consecutive codes, so each new digit you type completes a brand-new code instead of starting over. It's named after Nicolaas Govert de Bruijn, who formalized the construction in 1946, and the trick is now notorious among people who crack electronic combination locks.