|
|
A110742
|
|
Number of primes with digit sum n having at most n digits.
|
|
1
|
|
|
0, 2, 1, 8, 27, 0, 211, 500, 0, 5404, 23137, 0, 269736, 806856, 0, 10508986, 43103947, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(3n) = 0 for n > 1.
|
|
LINKS
|
|
|
EXAMPLE
|
For a(2) the two primes are 2 and 11. 101 is not included because it has 3 digits.
|
|
PROG
|
(PARI) f(n, i, left, num) = if (i == n - 1, return(left <= 9 && isprime(num + left*10^i))); sum(j = 0, min(left, 9), f(n, i + 1, left - j, num + j*10^i));
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|