[Math] Can we find prime numbers with any sum of digits (except those divisible by three)

number theoryprime numbers

I guess that this question is not something new and that there must be people who wanted to know if this question has an affirmative answer, but I would like to share it with you, because I really do not know if this is known or not?

Let us define sum of digits (in base 10) function $sd_{10}$ over the set of natural numbers in an obvious way as $sd_{10}(n)=\sum_{i=0}^ma_i$, where we have that $n=\sum_{i=0}^m a_i \cdot 10^i$.

If we choose some number, for example $7$ ,then we can find prime number which has its sum of digits equal to $7$, for example $61$.

If we choose some number divisible by $3$ as the sum of digits then we cannot find a prime number that has that sum of digits because it is known that the number is divisible by $3$ if and only if sum of its digits is divisible by $3$.

Let us also suppose here, because of the easier phrasing of the question, that the number $1$ is also prime so that if we choose that the sum of digits is $1$ we have a solution which equals $1$.

Now I would like to share this question with you:

Is it true that for every $n \in \mathbb N \setminus \{3k : k \in \mathbb N\}$ there exists at least one prime number $p$ which is such that we have $sd_{10}(p)=n$?

Best Answer

Ruling out $n=1$ and $3|n$ we have the following conjecture :

For every natural number $n$, there is a prime with digitsum $n$.

The conjecture is definitely true for $2\le n\le 200$ (I found proven primes with PARI/GP) and very probably true for $2\le n\le 1000$ (The numbers I found passed $10$ strong probable-prime-tests)

Since there are infinite many numbers with digit-sum $n$ for every $n$, and many of these numbers are "small", it is very likely that we find a prime for every $n$.

This should give an overhelming heuristical argument to believe that the claim is true for all $n$.

A proof of this conjecture is very probably currently out of reach.