The maths quirk that can cheer you up if you're feeling unpopular