Seeking Prime Repunits
Fermat's Little Theorem states that if m is a prime then b^m = b
(mod m) for every integer b. Therefore, if we can find an integer b
for which b^m is NOT congruent to b modulo m, we will have proven that
m is composite. Take, for example, b = 2, and set m = (10^71-1)/9.
If m is a prime we would find that 2^m = 2 (mod m). However, a little
calculation shows that in fact 2^m is congruent to
8422611138482701447440679341973903379774416284229892522771978154015187
modulo m, so it follows that m is composite. It helps to have a multi-
precision calculator or programming package to perform calculations of
this kind. If you have UBASIC, you can test for compositeness of
base-10 repunits using the following little program. (Note: UBASIC
uses the "@" symbol for "modulo".)
10 INPUT "enter p"; p
20 m = (10 ^ p - 1) \ 9
30 b = 2 : q = 1
40 FOR j = 1 TO p
50 qt = q
60 FOR k = 2 TO 10
70 q = (q * qt)@m
80 NEXT k
90 q = (q * b)@m
100 PRINT j, q
110 NEXT j
The only values of p < 10000 that will give a final output of 2
are 2, 19, 23, 317, and 1031. This just means that they are "probably"
primes, because composites that satisfy this test are extremely rare.
However, it has been proven by other methods that these repunits are
in fact primes.
For a long time those five numbers were the only known prime repunits
(in decimal), but in September 1999 Harvey Dubner found the next
"probable prime" repunit with p = 49081. This most likely is a prime,
but it would be prohibitive (by any known methods) to give a
deterministic proof.
Return to MathPages Main Menu
Сайт управляется системой
uCoz