Considering -digit primes containing repeated digits it is clear that they cannot all be the same: is divisible by , is divisible by , and so on. But there are nine -digit primes containing three ones:
We shall say that represents the maximum number of repeated digits for an -digit prime where is the repeated digit, represents the number of such primes, and represents the sum of these primes.
So is the maximum number of repeated digits for a -digit prime where one is the repeated digit, there are such primes, and the sum of these primes is . It turns out that for , it is only possible to have repeated digits, but there are such cases.
In the same way we obtain the following results for -digit primes.
Digit, d
M(4, d)
N(4, d)
S(4, d)
0
2
13
67061
1
3
9
22275
2
3
1
2221
3
3
12
46214
4
3
2
8888
5
3
1
5557
6
3
1
6661
7
3
9
57863
8
3
1
8887
9
3
7
48073
For to , the sum of all is .
Find the sum of all .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.