# What prime numbers have the sum of their digits as a prime number?

(Meta comment: Congrats to Andre Nicolas! I am happy for Andre Nicolas that he is second ranked now. Also he has 3001 answers with no questions. That is good. I am also glad to see Arturo Magidin has been online yesterday.)

Now my question is the following: What prime numbers have the sum of their digits as a prime number? We know that $3001$ (could be Andre's $3001$ answers) is a prime number with the sum of its digits a composite number. How many primes are there such that their sum of their digits is prime?

-
In base 2, every Mersenne prime qualifies. And every Fermat prime, for that matter. –  Tanner Swett Oct 19 '12 at 2:25
Reminds me of http://en.wikipedia.org/wiki/Rider_(legislation) –  anon Oct 19 '12 at 2:26
Generalising Tanner L. Sweet's first comment: Repunit primes qualify in any base. –  Douglas S. Stones Oct 19 '12 at 2:35

You might look at OEIS A046704

-

Most likely there are no generalized rules other than the following rules-of-thumbs: 1. A number with odd number of odd digits is likely to form an additive prime. 2. A number with even number of odd digits will never form an additive prime. 3. A number with even number of odd digits must be accompanied by odd number of odd digits not necessary equal to the former to likely to form additive prime. Here are my Maxima programline to confirm the above results: ggg(n):=f([a:eval_string("n"), x:charlist(string(n)),b:(sum(eval_string(part(x,k)),k,1,length(x)))])*(is(equal(primep(a)*primep(b),true^2))-unknown)/(true-unknown);

sum(ggg(n),n,1,1000);

Output:

f([991,["9","9","1"],19])+f([977,["9","7","7"],23])+f([971,["9","7","1"],17])+f([953,["9","5","3"],17])+f([937,["9","3","7"],19])+f([919,["9","1","9"],19])+ f([911,["9","1","1"],11])+f([887,["8","8","7"],23])+f([883,["8","8","3"],19])+f([881,["8","8","1"],17])+f([863,["8","6","3"],17])+f([829,["8","2","9"],19])+ f([827,["8","2","7"],17])+f([823,["8","2","3"],13])+f([821,["8","2","1"],11])+f([809,["8","0","9"],17])+f([797,["7","9","7"],23])+f([773,["7","7","3"],17])+ f([757,["7","5","7"],19])+f([751,["7","5","1"],13])+f([739,["7","3","9"],19])+f([733,["7","3","3"],13])+f([719,["7","1","9"],17])+f([683,["6","8","3"],17])+ f([661,["6","6","1"],13])+f([647,["6","4","7"],17])+f([643,["6","4","3"],13])+f([641,["6","4","1"],11])+f([607,["6","0","7"],13])+f([601,["6","0","1"],7])+f([599,["5","9","9"],23]) +f([593,["5","9","3"],17])+f([577,["5","7","7"],19])+f([571,["5","7","1"],13])+f([557,["5","5","7"],17])+f([487,["4","8","7"],19])+f([467,["4","6","7"],17])+ f([463,["4","6","3"],13])+f([461,["4","6","1"],11])+f([449,["4","4","9"],17])+f([443,["4","4","3"],11])+f([421,["4","2","1"],7])+f([409,["4","0","9"],13])+f([401,["4","0","1"],5])+ f([397,["3","9","7"],19])+f([379,["3","7","9"],19])+f([373,["3","7","3"],13])+f([359,["3","5","9"],17])+f([353,["3","5","3"],11])+f([337,["3","3","7"],13])+f([331,["3","3","1"],7]) +f([317,["3","1","7"],11])+f([313,["3","1","3"],7])+f([311,["3","1","1"],5])+f([283,["2","8","3"],13])+f([281,["2","8","1"],11])+f([269,["2","6","9"],17])+f([263,["2","6","3"],11]) +f([241,["2","4","1"],7])+f([229,["2","2","9"],13])+f([227,["2","2","7"],11])+f([223,["2","2","3"],7])+f([199,["1","9","9"],19])+f([197,["1","9","7"],17])+f([193,["1","9","3"],13]) +f([191,["1","9","1"],11])+f([179,["1","7","9"],17])+f([173,["1","7","3"],11])+f([157,["1","5","7"],13])+f([151,["1","5","1"],7])+f([139,["1","3","9"],13])+ f([137,["1","3","7"],11])+f([131,["1","3","1"],5])+f([113,["1","1","3"],5])+f([101,["1","0","1"],2])+f([89,["8","9"],17])+f([83,["8","3"],11])+f([67,["6","7"],13])+ f([61,["6","1"],7])+f([47,["4","7"],11])+f([43,["4","3"],7])+f([41,["4","1"],5])+f([29,["2","9"],11])+f([23,["2","3"],5])+f([11,["1","1"],2])+f([7,["7"],7])+f([5,["5"],5]) +f([3,["3"],3])+f([2,["2"],2]) HuneYeong Kong

-