Happy prime

A happy number is any number which reduces to one when you take the sum of the square of its digits and you continue iterating until it yields one.

A happy prime is a number which is both happy and prime.

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 Doctor. (DW: 42)