Post Reply 
challenge - prime numbers where sum of squared digits of prime number is also prime
01-05-2018, 02:01 PM
Post: #2
RE: challenge - prime numbers where …
from a well know wiki

Code:
A happy prime is a number that is both happy and prime. The happy primes below 500 are

7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193, 239, 263, 293, 313, 331, 367, 379, 383, 397, 409, 487 (sequence A035497 in the OEIS).

All numbers, and therefore all primes, of the form 10n + 3 or 10n + 9 for n greater than 0 are happy. This does not mean that these are the only happy primes, as evidenced by the sequence above. To see this, note that

All such numbers will have at least two digits;
The first digit will always be 1 due to the 10n
The last digit will always be either 3 or 9.
Any other digits will always be 0 (and therefore will not contribute to the sum of squares of the digits).
The sequence for numbers ending in 3 is: 12 + 32 = 10 → 12 = 1.
The sequence for numbers ending in 9 is: 12 + 92 = 82 → 82 + 22 = 64 + 4 = 68 → 62 + 82 = 36 + 64 = 100 -> 1.
The palindromic prime 10150006 + 7426247×1075000 + 1 is also a happy prime with 150,007 digits because the many 0's do not contribute to the sum of squared digits, and {\displaystyle 1^{2}+7^{2}+4^{2}+2^{2}+6^{2}+2^{2}+4^{2}+7^{2}+1^{2}=176} 1^{2}+7^{2}+4^{2}+2^{2}+6^{2}+2^{2}+4^{2}+7^{2}+1^{2}=176, which is a happy number. Paul Jobling discovered the prime in 2005.[6]

As of 2010, the largest known happy prime is {\displaystyle 2^{42643801}-1} 2^{{42643801}}-1 (Mersenne prime).[dubious – discuss] Its decimal expansion has 12,837,064 digits.[7]


It is to be noted that unlike happy numbers, it cannot be assumed that rearranging the digits of a happy prime will create another happy prime. For instance using the happy prime 19 we cannot assume 91 is a happy prime. 91 being not prime !

BEST!
SlideRule

ps: the ellipsis is needed for character length; 87 max, 89 generated
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: challenge - prime numbers where … - SlideRule - 01-05-2018 02:01 PM



User(s) browsing this thread: 1 Guest(s)