Can you answer my son's fourth-grade homework question: Which numbers are prime, have digits adding to ten and have a three in the tens place?

As requested I'm posting this an answer. I wrote a short sage script to check the primality of numbers of the form $10^n+333$ where $n$ is in the range $[4,2000]$. I found that the following values of $n$ give rise to prime numbers:

$$4,5,6,12,53,222,231,416.$$

Edit 3: I stopped my laptop's search between 2000 and 3000, since it hadn't found anything in 20 minutes. I wrote a quick program to check numbers of the form $10^n+3*10^i+33$. Here are a couple

  • 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033
  • 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300033
  • 100000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000033
  • 100000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000033
  • 100000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000033
  • 10000000000000000000000000000000003000000033
  • 10000000000000000000000000000030000000000033
  • 10000000000000000000000030000000000000000033
  • 10000000003000000000000000000000000000000033

There seemed to be plenty of numbers of this form and presumably I could find more if I checked some of the other possible forms as outlined by dr jimbob.

Note: I revised the post a bit after jimbob pointed out I was actually looking for primes that didn't quite fit the requirements.

Edit 4: As requested here are the sage scripts I used. To check if $10^n+333$ was prime:

for n in range(0,500):
  k=10^n+333
  if(is_prime(k)):
    print n

And to check for numbers of the form $10^n+3*10^i+33$:

for n in range(0,500):
  k=10^n+33
  for i in range(2,n):
    l=k+3*10^i
    if(is_prime(l)):
      print l

From Srivatsan Narayanan's comment: there are on the order of $n^7$ numbers satisfying the digit constraint, with $n$ digits. The probability that a random $n$-digit number is prime is of order $1/n$. So naively there are on the order of $n^6$ $n$-digit numbers satisfying all the conditions. The sum of sixth powers diverges (quite strongly!) and I suspect the answer is infinitely many and would be quite surprised to learn otherwise. In particular the number of such integers with $n$ digits or less "ought to be" on the order of $1^6 + 2^6 + \cdots + n^6$, or on the order of $n^7$; the number of such integers less than or equal to $x$, then, is on the order of $\log_{10} (Cx^7)$ for some constant $C$, or about $7 \log_{10} x$.