Some Primes of The Form (An - 1) / (A - 1) : by H. C. Williams and E. Seah

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

MATHEMATICS OF COMPUTATION, VOLUME 33, NUMBER 148

OCTOBER 1979, PAGES 1337-1342

Some Primes of the Form (an — 1)/(a — 1)


By H. C. Williamsand E. Seah

Abstract. A table of primes of the form (a — l)/(a — 1) for values of a and n such
that 3<a<12, 2<n< 1000 is presented. A description is given of the techniques
used to obtain this table, and some numbers such as (10 - l)/9 which are pseudo-
prime but whose primality is not yet rigorously established are also discussed.

1. Introduction. For many years there has been considerable interest in the
factorization of integers of the form a" - I. Much work has been done on primes of
the form 2" - 1 including an empirical analysis of the distribution of such primes*
(Gillies [3], Tuckerman [6] ) and on the primes of the form (10" - l)/9, the so-called
repunit numbers. However, there has been little recent work on primes of the form
(a" - l)/(a - 1) for values of a other than 2 and 10.
Some tables of primes of this form for small values of a can be found in Krait-
chik [4] but the methods available at the time [4] was written did not permit investi-
gation of such numbers for large values of n. Modern methods of primality testing
(see Williams [9] ) often allow for the determination of quite large primes. The pur-
pose of this paper is to illustrate the power and limitations of these techniques by
utilizing them to attempt to tabulate all primes of the form (an - 1)/(a - 1) for 3 <
a< 12 and 1 <n < 1000.
2. Available Techniques. In order to test N (odd) for primality it is usually
necessary to have a number of factors of N - 1. Suppose

N- 1 =FXSXS2S3 ■■• Sk,


where (St, Fx) = I (i = 1,2,3, . . . , k),

Fx= i=i
n if*
is completely factored, and any prime factor of S¡ (i = 1,2,3, ... ,k) must exceed
a factor bound B (>2). We have the following results of Brillhart, Lehmer, and Self-
ridge [1] which can be used as tests for primality.

Theorem 1. If for each q¡ \FX, there exists an integer a( such that

(ajN-1V"i-l,N) = l

Received November 20, 1978.


AMS (MOS) subject classifications (1970). Primary 10-04, 10A25.
♦Recently C. Noll and L. Nickel have identified 2 - 1 as a prime.

© 1979 American Mathematical Society


0025-571 8/79/0000-0169/$02.50
1337
1338 H. C. WILLIAMS AND E. SEAH

and

fff-1 = 1 (modAO,
then any prime divisor of N must have the form mFx + 1.

Theorem 2. If for each S¡ above, there exists an integer b¡ such that


tb(N-l)/Si_hN)=l
and

bf~l = 1 (modAO,
then any prime divisor of N must have the form msxs2s3 • ■■sk + I, where s¡ is
some prime divisor of S(.

Clearly, if the conditions of both Theorem 1 and Theorem 2 hold, then any
prime factor of Af must have the form sxs2s3 • • ■s^ra + 1 > BkFx. If (B Fx) >
N, N must be a prime.
Now if Nnia) = (a" - l)/(a - 1), then

Nn(a)-l=aNn_x(a);
also, if Nn(a) is a prime, then « is a prime. As we are interested only in possible
prime values of Nn(a), we see that n - 1 is not a prime and, as a consequence,
Nn(a) - 1 can first be factored algebraically. We then try to find factors of the alge-
braic divisors. The process of finding these factors is frequently time consuming and
often very difficult; thus, we attempt to minimize the number of factors of Nn(a) - 1
which we will need. To this end we make use of the following theorem, which is an
extension of some results in [1].

Theorem 3. Suppose that the conditions of Theorems 1 and 2 hold for some
N and let

D(t) = (2tF\ + AFX + 2)2 - 4N,


where

A=(N-l)/Fx (mod 2f,)

and 0 < A < 2FX. IfD(t) is not a perfect square for any t such that 0 < t < T and
Bk(A + 2TFX - Bk)F\ > N, then N is a prime.

Proof. If p is any prime divisor of N, then p = 1 + mxFx and N/p = 1 +


m2Fx, where mx, m2 > sx s2 -s3 •. . .-sk > Bk. Thus,

(N- l)/Fx = mxm2Fx + mx + m2.


Since (/V - l)/Fx is odd and Fx is even, we must have mx + m2 odd and consequent-
ly mxm2 is even; thus

mx +m2=A + 2tFx (t > 0)


SOME PRIMES OF THE FORM (a" - l)/(a - 1) 1339

and

N = (A + 2tFx - m2)m2F\ + (A + 2tFx)Fx + 1.

If we put X = m2Fx, we get

X2 - X(AFX + 2tF\) - AFX -2tF\+N~l=0.

Since X must be an integer and the discriminant of this quadratic in X is D(t), we


must have t > T. Now both mx, m2 > Bk and m, + m2 > A + 2TFX; hence,

N > mxm2F2 > Bk(A + 2TFX - Bk)F2 > N, a contradiction.

Note that if D(t) is a perfect square, say K2, for some t, then K must be even
and

N = (tF¡ + AFx/2 + I)2 - (K/2)2.


If N ^ 2tF2 + AFX + 1, we have a nontrivial factorization of N.
The utilization of this theorem presents little difficulty for values of T < 108.
As there is rarely a chance that N will have a nontrivial factorization, we simply show
that for each t < T the Legendre symbol (D(t) Iit¡) = -1 for some tt¡ in a set II of
about 30 small primes. This is most easily and rapidly accomplished by sieving out
all values of t < T such that (D(t ') In¡) = -1 when t = t' (mod nt).
In spite of the existence of the devices mentioned above for minimizing the
amount of factoring to be done, we must still do some factoring and, in some cases,
a great deal of it. The usual method is to trial divide N - 1 up to a factor bound B
by using a 'wheel' method such as that described by Wunderlich and Selfridge [10].
D. H. Lehmer has implemented a version of this technique on the ILLIAC IV and any
factor bound B recorded below which exceeds 108 is due to him.
After trial division, the P - 1 method discovered by Pollard [5] can be used.
This technique, known to D. N. and D. H. Lehmer but never published by them, con-
sists of calculating / = (bp - 1, M) for some b, where P = n*=1 pf'. Here p¡ is the
ith prime and pf' is the largest power of p. less than a fixed bound BP. Very often
/is not 1 or M and a factor of M results.
Finally, we make mention of an already existing (although not yet published)
table [2] of factors of numbers of the form a" - I. Several times the demonstration
of the primality of Nn(a) was easily facilitated through the existence of factors of
Nn_x(a) in this table.
3. Results. The algorithms mentioned above were implemented on an IBM
370-168 computer and run for all possible primes of the form Nn(a) for 3 < a < 12 and
n < 1000. In the case of a = 10, the work of Williams [8] was continued from n =
1000 to 2000. The candidates for primality were, of course, those values of Nn(a)
such that n is a prime, Nn(a) does not have a small prime factor and

13/v-„(a)-i = , (mod 7V„(a)).


1340 H. C. WILLIAMS AND E. SEAH

In Table 1 below we present the results of these computer runs together with results
found previously by others.

3, 7, 13. 71. 103 . 541


3, 7, 11, 13, 47+, 127+, 149+"\ 181++' 619, 929*
2, 3, 7, 29t, 71+, 127++, 271, 509
5, 13, 131ft, 149tf

10 2, 19, 23, 317, 1031


+ ** *
il 17, 19, 73 , 139 ' 907
f, 109+t, 317, 353

Table 1

Table of all values of n such that (a" - l)/(a - 1) is a prime for3<a<12,2=Sn


< 1000. (For a = 10, the table records all primes for 2 < n < 2000.)

Remarks. (1) Numbers identified by an (*) have not yet been proved prime,
they are pseudoprime to several bases and are most likely to be prime, but not enough
factors of Nn(a) - 1 are known yet for primality testing. See the next section.
(2) Most of the prime values of Nn(a) for n < 23 can be found in [4].
(3) Values of Nn(a) with n marked by C1")were identified as prime in [2] and
values of Nn(a) with n marked by (T"l")were identified as pseudoprime in [2].
(4) The number Af139(ll) was identified as a pseudoprime at a time when the
authors of [2] thought that the base 11 table of [2] would extend to 150 instead of
the present limit of 135.
Some of the numbers proved prime above merit some extended discussion. For
example, (12317 - 1)/11 and (12353 - 1)/11 could only be proved prime after the
prime factor 77554200461 of 12158 + 1 and the prime factor 1200913648289 of
12176 + 1 were found by the P - 1 method with BP = 130000. Also, it was neces-
sary to prove that

(1279 - 1)/11 •162109•130479719


is a prime.
For Af509(6) = (6509 - l)/5 and B = 2702845200, the only prime factors of
^509(6) - 1 are 2, 3, 7, 37, 509, 2287. Fortunately, theP - 1 method with BP =
130000 was able to isolate the prime factors 140348646913and 25974264373441of
62 54 + j This togetner with the fact that (6i27 _ ,^5 is a prime was suff-lcient t0
prove A509(6) a prime.
Of the numbers proved prime here (5619 - l)/4 was the most difficult. We
first showed that (5103 + l)/6 is a prime. With a factor bound of B = 2575300800
we have

5i03 _ , _ 22•3709-28429-C1;

5206 _5i03 + j =3.7.i487527.4527469-642310267-C2,


SOME PRIMES OF THE FORM (a" - l)/(a - 1) 1341

5206 + 5i03 + , =3i.619-C3,


where Cx, C2, C3 axe composite. Again the P- 1 technique with BP = 130000 pro-
vided the prime factors 330545029709161of C2 and 8934148519 of C3. This, and
Theorem 3 with T = 2000000 was sufficient to establish the primality of (5619 - l)/4.

4. Limitations. As indicated in the previous section, the status of (5929 - l)/4,


(ll907 - 1)/10 and (101031 - l)/9 is still unproved. We give below what is currently
known about the factors of Nn(d) - 1 for these numbers.
For (5929 - l)/4 we have complete factorizations of 529 - 1, 529 + 1, 5s8 + 1.
Also

5116 + , = 2.3,3 .233 .929 .33409 •Cx,


5232 + , =2-17-11489-C2,

5464 + , _ 2-2593-974401-7099201-29423041 C3,


with a factor bound on Cv C2, C3 of 5 x 107. No factors of the composite numbers
Cj, C2, C3 were found by the P - 1 method with BP = 130000.
For(ll907 - 1)/10, we have
ll151 + 1 = 22-3-907-3323-255421785001 Cx,
ll151 -1 = 2-5-16944919-13665285883 C2,
ii302 + ,,151 + , =7.i9.2719-C3,

ll302 - ll151 + 1 =3-37-799093-C4.


Here the factor bound is 6 x 107 and the larger factors were found by using the P - 1
method with BP = 130000. Cx, C2, C3, C4 are all composite.
The most interesting of these three numbers is (101031 - l)/9. We have

10103 - 1 = 32-1031-7034077 P1,


10103 + 1 = 11-1237-44092859-102860539-984385009-Cj [2],
(10s15 + 1)/(10103 + O = 7211 -9091-497491-569836171-2013681931-C2,
(10s15 - 1)/(10103 - 1) = 41 -271 -5905014721 C3,

where Cx, C2, C3 axe composite, the factor bound on C2 and C3 is 108 and the factor
bound on C, is 23s [2]. The larger factors of the last two numbers were found by
the P - 1 method with BP = 70000.
The number Px is a rather interesting prime and worthy of some further mention.
It was necessary to use the methods of Williams and Judd [7] to prove the primality
of this number. With a factor bound of 31250044839 we get

Px - 1 = 22-103-Cp

Px + 1 = 2-32-15358247 C2,
P\+Px +l=l-C3,
1342 H. C. WILLIAMS AND E. SEAH

P\ + 1 =2-5-13-941 •4049-244200149-C4,
P\-Pl+1 = 3 • 19-124783-C5,
where Cx, C2, C3, C4, C5 axe ail composite. This is not enough to establish primality,
but by using the P - 1 method on Cv C2, C3, C4, Cs with BP = 130000, we get the
prime factors 906732292429of C3 and 162391349686704225169920001of Cs.
This additional information was enough to prove Px a prime.
While it is not now possible with the information we have here to prove primal-
ity for the large numbers above, it should be mentioned that a decade ago no one
would have thought it possible to prove a number like (5619 - l)/4 a prime. Yet in
the last ten years much progress has been made both in technology and in the theory
of factorization and primality testing. Perhaps future results will permit a rigorous
demonstration of the primality of these numbers.

5. Acknowledgements. The authors gratefully acknowledge the results obtained


for them by D. H. Lehmer on the ILLIAC IV. Without these results this present work
could not have been completed. They also wish to thank J. Brillhart and J. Selfridge
for making a copy of [2] available and S. Yates for providing a table of factors of
10" -1.
Department of Computer Science
University of Manitoba
Winnipeg, Manitoba, Canada R3T 2N2

1. J. BRILLHART, D. H. LEHMER & J. L. SELFRIDGE, "New primality criteria and


factorizations of 2m t 1," Math. Comp., v. 29, 1975, pp. 620-647.
2. J. BRILLHART, D. H. LEHMER, EMMA LEHMER, J. L. SELFRIDGE, BRYANT
TUCKERMAN & S. S. WAGSTAFF, JR., "Factorizations of ft" - 1 and ft" + 1 for ft < 13."
(Unpublished.)
3. DONALD B. GILLIES, "Three new Mersenne primes and a statistical theory," Math.
Comp., v. 18, 1964, pp. 93-97.
4. M. KRAITCHIK, Recherches sur la Théorie des Nombres, Tome 2, Gauthier-Villars,
Paris, 1929.
5. J. M. POLLARD, "Theorems on factorization and primality testing," Proc. Cambridge
Philos. Soc, v. 76, 1974, pp. 521-528.
6. BRYANT TUCKERMAN, "The 24th Mersenne prime," Proc. Nat. Acad. Sei. U.S.A.,
v. 68, 1971, pp. 2319-2320.
7. H. C. WILLIAMS & J. S. JUDD, "Some algorithms for prime testing using generalized
Lehmer functions," Math. Comp., v. 30, 1976, pp. 867-886.
8. H. C. WILLIAMS, "Some primes with interesting digit patterns," Math. Comp., v. 32,
1978, pp. 1306-1310.
9. H. C. WILLIAMS, "Primality testing on a computer," Ars Combinatoria, v. 5, 1978,
pp. 127-185.
10. M. C. WUNDERLICH & J. L. SELFRIDGE, "A design for a number theory package
with an optimized trial division routine," Comm. ACM, v. 17, 1974, pp. 272-276.

You might also like