Happy prime

"Any number that reduces to one when you take the sum of the square of its digits and continue iterating it until it yields 1 is a happy number, any number that doesn't, isn't. A happy prime is both happy and prime." The Doctor Season 3, episode 8 "42"

When the S.S. Pentallian hurtled towards the Torajii sun, Riley Vashtee and Martha Jones used the happy number sequence (313, 331, 367, 379) to reach the ship's back-up engines, with help from the Tenth Doctor. (DW: 42).