Repdigits are numbers consisting only of repetition of the same digit value. (Single-digit numbers are excluded by definition.)

For Mersennes' exponents, digit values larger than one lead to composite exponents, and thereby to composite Mersenne numbers. Composite digit counts also lead to

composite exponents and composite Mersenne numbers. This leaves exponents consisting of a prime number of ones, which lead to mostly composite exponents. It also leads to a very small set of candidates, since for p<10

^{9}, number of digits no greater than 9, only 2, 3, 5, or 7 digits are prime length for exponent expressed in base ten.

In 1<p<999999999 Mersenne.org range:

11; prime exponent but 2

^{11}-1 is divisible by 23.

111 = 3 x 37; could have ruled this out by noting sum of digits is 3

11111 = 41 x 271

1111111= 239 × 4649

So there are no Mersenne primes with base-10 repdigit exponents in 1<p<999999999 mersenne.org range.

Trying hexadecimal,

11h = 17 decimal prime exponent; 2

^{11h}-1 =131071 base 10

111h = 273 = 3 x 7 x 13

11111h = 69905 = 5 × 11 × 31 × 41

1111111h = 17895697 = 29 × 43 × 113 × 127

Use of smaller number bases bring more small prime exponent lengths into range.

Near the limit, base 3

11(3) = 4 = 2

^{2}
111(3) = 13 (prime) M(13) is Mp5

11111(3)= 121= 11

^{2}
1111111(3) = 1093 (prime); M(1093) has 5 factors

11111111111(3) = 88573 = 23 × 3851

...7 174453 = 11

^{2} × 13 × 4561

64 570081 = 1871 × 34511

Base 2:

bits p Mp status

2 3 prime

3 7 prime

5 31 prime

7 127 prime

11 2047 = 23 × 89 so Mp is composite

13 8191 composite

17 131071 composite

19 524287 composite

23 8388607 = 47 × 178481

29 536870911 = 233 × 1103 × 2089

**Near-repdigits**
Exponents with the rightmost digit differing from the rest may be prime for digit values other than one repeating also.

A small perl program to find 9-digit base 10 prime exponents that are near-repdigits yields the following 7 exponents, with current status as shown:

111111113 Factored

222222227 LL DC

444444443 Factored

666666667 Tested LL & DC by LaurV

777777773 Factored

888888883 Factored

888888887 No factor to 85 bits TF completed; P-1 done; no primality test

Six composite, one remaining to be determined in the short list above.

Code:

# nearrep.pl
# perl script to find near repdigit exponents iiiiiiiij, j != i, i>0, base 10
use ntheory;
$count=0;
for ( $i=1; $i<10; $i++ ) { #repfield is $i as digits x 8 places
foreach $j ( 1, 3, 7, 9 ) { #rightmost
if ($i != $j ) {
$k=$i*11111111*10+$j;
if ( Math::Prime::Util::GMP::is_prime($k) == 0 ) {
# print "$k is composite\n";
} else {
print "$k\n";
$count++;
}
}
}
}
print "Counted $count\n(end)\n";

Requiring the differing digit to be on the right is a special case / subset of the

near-repdigit definition.

Checking for other positions of the differing digit, and annotating the resulting output with current status:

Code:

# nearrep2.pl
# perl script to find near repdigit exponents i..iji..i, j != i, i>0, base 10
# where leftmost digit may be j but rightmost is not
use ntheory;
$count=0;
for ( $l=1; $l<9; $l++ ) { #power of ten at which digit differs
for ( $j=0; $j<10; $j++ ) { #differing digit
foreach $i ( 1, 3, 7, 9 ) { #repfield is $i as digits x 8 places
if ( $i != $j ) {
$k= $i*111111111 +($j- $i) *10**$l;
if ( Math::Prime::Util::GMP::is_prime($k) == 0 ) {
# print "$k is composite\n";
} else {
print "$k\n";
$count++;
}
}
}
}
}
print "Counted $count\n(end)\n";

Code:

333333313 factored
999999929 NF 85; P-1 NF; TF in progress
111111131 factored
111111181 LL C
777777577 factored
999999599 factored
777777677 factored
333331333 factored
999992999 NF 85, TF in progress
111113111 factored
333334333 factored
777776777 NF 85, P-1 NF, PRP in progress
777767777 factored
111181111 factored
111191111 factored
333233333 factored
999299999 NF 86, P-1 NF, PRP in progress
999499999 factored
999599999 NF 86, P-1 NF, PRP in progress
333733333 factored
333833333 factored
115111111 factored
776777777 factored
337333333 NF 81; P-1 NF, PRP C, CERT
118111111 LL C
778777777 factored
998999999 NF 86; P-1 NF, PRP in progress
101111111 factored
131111111 factored
373333333 factored
787777777 factored
577777777 factored
799999999 NF 85; P-1 NF; PRP assigned prematurely but no progress
Counted 33
(end)

23 factored, 2 LL composite primality test result, 8 remaining to be determined in the list immediately above.

Top of reference tree:

https://www.mersenneforum.org/showpo...22&postcount=1