Langford's colored blocks puzzle
Take two red blocks, two blue blocks, and two yellow blocks and line all six up in a row. Can you arrange them so that exactly 1 block sits between the two reds, exactly 2 blocks sit between the two blues, and exactly 3 blocks sit between the two yellows?
Reveal the answer
Numbering red=1, blue=2, yellow=3, one solution is 2,3,1,2,1,3 (its mirror image 3,1,2,1,3,2 is the only other one). Scottish math teacher C. Dudley Langford invented the puzzle in 1958 after watching his young son arrange colored cubes exactly this way, then wrote it up as a problem in the Mathematical Gazette. These 'Langford pairings' turn out to exist only when the number of colors is congruent to 0 or 3 modulo 4 - for 1, 2, or 5 colors, no arrangement is possible at all.