Friday, August 17, 2007

When Is A Palindromic Number Prime?


(Figure Caption: The number of palindromic numbers less than a given number n. Source: http://mathworld.wolfram.com/PalindromicPrime.html)................................................................................
While seriously thinking about palindromic numbers (See http://raffysaldana.blogspot.com/2007/08/palindromes-and-palindromic-numbers.html) I thought that writing a program to determine whether a given palindromic number is prime would be a good programming exercise.


Then, by searching the Web using Google (http://www.google.com/) I found a website discussing palindromic primes (http://mathworld.wolfram.com/PalindromicPrime.html).


From the website, I found some interesting facts:


1. The first few (base-10) palindromic primes are 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, ...


2. The number of palindromic primes less than a given number are illustrated in the plot above.


3. The number of palindromic numbers having n=1, 2, 3, ... digits are 4, 1, 15, 0, 93, 0, 668, 0, 5172, 0, ...


4. The total number of palindromic primes less than 10, 10^2, 10^3 , ... are 4, 5, 20, 20, 113, 113, 781, ...


5. Gupta (2006) has computed the number of palindromic primes up to 10^19.


6. Banks et al. (2004) proved that almost all palindromes (in any base) are composite.


7. As of Jan. 2006, the largest proven palindromic prime is found by P. Jobling (2005), which has 150007 decimal digits.


Very interesting!


Cheers,


Raffy

8/17/07 in Quezon City



No comments: