$(1)$ A circular prime is a prime number with the property that the number generated at each intermediate step when cyclically permuting its (base 10) digits will be prime.

For example, 1193 is a circular prime, since 1931, 9311 and 3119 all are also prime.

$(2)$ A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits in base-ten, and repeat the process until the number either equals 1 (where it will stay), or it loops endlessly in a cycle that does not include 1. Those numbers for which this process ends in 1 are happy numbers.

For example, $19$ is happy, as the associated sequence is

$1^2 + 9^2 = 82,$

$8^2 + 2^2 = 68,$

$6^2 + 8^2 = 100,$

$1^2 + 0^2 + 0^2 = 1.$

$(3)$ A palindromic prime is a prime that remains the same when its digits are reversed.

For example, $11$

A Circular happy palindromic prime is a prime number that has all three of the above properties.

According to my testing in PARI/GP and my own results, I have found the following circular happy palindromic primes:

$7, 1111111111111111111$ (19 digits)$, 11111111111111111111111$ (23 digits)

(Haven't tested complete range of $10^{24}$ in PARI/GP)

Note that 19 and 23 are happy primes themselves which explains why $1111111111111111111, 11111111111111111111111$ are also happy primes.


$(1)$ Are $7, 1111111111111111111, 11111111111111111111111$ the only circular happy palindromic primes?

$(2)$ Are $1111111111111111111, 11111111111111111111111$ the only happy primes of the form 11111.... ?

$(3)$ If not then are there a finite number of circular happy palindromic primes? Can we prove/disprove this?

  • $\begingroup$ Use ^ for exponents; 6^2 gives $6^2$ and 6^{12} gives $6^{12}$. $\endgroup$ – Oscar Lanzi May 7 at 0:22
  • $\begingroup$ guessing 3 doesn't count ? $\endgroup$ – Roddy MacPhee May 7 at 0:42
  • $\begingroup$ It is not evident that there are just a finite number of primes similar to your second example (formed only by 1's) $\endgroup$ – Piquito May 7 at 1:26
  • $\begingroup$ @roddy $3$ is unhappy. If you repeatedly add digits and square you get $3,9,81,65,61,\color{red}{37},58,89,145,42,20,4,16,\color{red}{37}$ and the numbers cycle instead of reaching $1$. $\endgroup$ – Oscar Lanzi May 7 at 1:49
  • $\begingroup$ @Piquito I know it's not evident if there are finite primes of the form 111...11 with 1s all in between, but according to my testing there are no more happy primes of this form. $\endgroup$ – Mathphile May 7 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.