<<

(Appeared in Mathematica Japonica, 26:1, 1997, 189—195)

UNIQUE (PERIOD) PRIMES AND THE OF CYCLOTOMIC MINUS ONE . CHRIS K. CALDWELL

ABSTRACT. Let b be an greater than one. For each prime p not dividing b, the expansion of 1/p ( b) has a period dividing p−1. Unique primes are those primes (not dividing b) for which no other prime has the same period. Let Φ (X) be the nth cyclotomic . We n develop criteria for when Φ (X)−1 is divisible by Φ (X), and use this to add 18 new primes (and n k 10 new probable primes) to the list of the 29 previously known unique primes (base 10). The divisibility properties found are useful in the search for primes of many forms.

1. DEFINITION OF UNIQUE PRIMES

Let p be a prime not dividing 10. The expansion of the prime reciprocal 1/p has a period dividing p−1 (because the period of the prime p is also the order of the element 10 in the Zp). For example, the primes 3, 11, 37 and 101 are the only primes with periods 1, 2, 3 and 4 respectively. The pairs of primes 41 and 271, 7 and 13, and 239 and 4649 have periods 5, 6 and 7 respectively. In [24] Yates defined the unique primes to be those primes (such as 3, 11, 37 and 101) for which no other prime has the same period. This type of prime is very rare−there are only 18 of them less than 1050 (they are explicitly listed in [5]). Given any positive integer n, all the primes with period n must divide Φn(10) where Φn(x) is the nth :

k µ(n/d) Φ (X) = Π (X − ζ ) = Π (Xd − 1) , and Xn − 1 = Π Φ (X) n − n d . 1

. 1991 Mathematic Subject Classification. Primary 11Y11, 11-04; Secondary 11A63, 11R18, 12E10, 12Y05. Key words and phrases. unique primes, primality testing, cyclotomic polynomials. [18,19], then for n <16500 by Dubner [9,19]; and for b < 80 (with varying limits on n) by Dubner [9]; and of course for b = 2 (the Mersenne primes) for n < 797850 (and miscellaneous larger exponents), see the status page [23] of the Great Internet Search [22]. (4) Many other classical prime forms are subsumed by Φn(b), for example the Fermat primes are Φ Φ 2n+1(2) and the generalized Fermat primes 2n+1(b)[2,11,21].

2. RESULTS OF SEARCH

Using the Fermat type primality tests, it is very easy to find unique probable primes. Using a special processor designed for large integer [6,10,15] we screened the numbers Φn(10) (sans intrinsic factors) up to n=10000 (Harvey Dubner [8] did most of the screening for n<6000) and found them to be probable prime for the following values of n:

n = 385, 945, 1172, 1282, 1404,1427, 1452, 1521, 1752, 1812, 1836, 2134, 2232, 2264, 2667, 3750, 3903, 3927, 4274, 4353, 6437, 6522, 6682, 8696, and 9550.

as well as for the 29 (mostly smaller) values of n previously proven prime by others [19,24,25,26] (these may be found in table one). At the author’s request Morain [13] has shown that three of these numbers are prime (n = 1426, 1862 and 2134). Though Morain and has shown both a 1505 digit and a 1226 digit number prime using Atkin's test [1,12], the size of most of these probable primes makes most of them well beyond the range the general primality proving routines. This leaves the classical tests based on the of N±1... (see [4,20]). Fortunately, we are able to show (using the below) that Φn(b)−1 is often divisible by Φm(b) with m

pr-1(p−1) X − 1 pr-1 n/p Φ(X) − 1 = X = X Φ (X) (n = pr) n pr-1 Π d − φ X 1 d | (n) d /| n/p

pn/2p Φ( − Φ ( . s r n X) 1 = X Π d X) (n = 2 p ) d | φ(n) d /| n/2p

Φ ( − In these cases n X) 1 factors completely using cyclotomic polynomials. For other cases the factorizations are not complete. The first four such cases are the following.

Φ( − Φ ( Φ ( Φ ( 3 − 2 15 X) 1 = X 1 X) 2 X) 4 X) (X X + 1)

Φ( − Φ ( Φ ( Φ ( 7 21 X) 1 = X 1 X) 2 X) 6 X) (X + X + 1)

Φ( − Φ ( Φ ( Φ ( 3 2 − 30 X) 1 = X 1 X) 2 X) 4 X) (X + X 1)

Φ( − Φ ( Φ ( Φ ( Φ ( 9 − 8 6 − 5 3 − 2 33 X) 1 = X 1 X) 2 X) 5 X) 10 X) (X X + X X + X X + 1)

The fact that Φn(X)−1 is often divisible by Φm(X) is shown by the following:

α . Let n > 1 be an integer and write n = Π p i (where the p are distinct primes). Set i i Π Φ − Φ R = pi and n = LR. Let p be any prime of n. Then n(X) 1 is divisible by k(X) for the following values of k

(i) k | L whenever R is not a prime, (ii) k | 2L, k /| L whenever R is not 2 or twice a prime, (iii) k | (p−1)L whenever pk =/ (k,L)R. (iv) k | ((p+1),φ(R/p))L whenever pk =/ (k,L)R.

(Here φ is Euler’s totient function.) We will present the proof in the next section. Examples: (1) When N = Φ2264(10), this theorem tells us that Φm(10) divides N−1 for every divisor m of 1128 except 8. The product of these terms is exactly N−1 and the known factors of these terms are more than sufficient to complete the primality proof. This 1128 digit number is currently the largest known unique prime (base 10). (2) When N = Φ3750(10), the theorem above tells us that Φm(10) divides N−1 for each of the m of 500. The product of these terms is slightly over 60% of N, and enough of their factors are known to complete the primality proof. This number has the longest period of any known (base 10) repunit-prime. (3) When N = Φ1521(10), the theorem above tells us that Φm(10) divides N−1 for each of the divisors m of 468 except 9 and 117. This would be enough factors (the product of the values of these cyclotomic polynomials is greater than the root of N−1) but currently not enough factors of Φ468(10) are known. However it is easy to find enough small factors of the cofactor to complete the primality proof. Again, using this theorem we were able to complete the primality proofs for all but ten of the probable primes in the list above. These probable primes are marked with brackets in table 1.

3. NECESSARY AND SUFFICIENT CONDITIONS THAT Φm(b) DIVIDES Φn(b)−1

Rather than focus on whether Φk(X) divides Φn(X)−1, we address the equivalent question of Φ ζ ζ when n( k) = 1 for a primitive kth k. This first theorem tells us that k must divide φ(n).

Φ ζ φ Theorem 1. Let n > 1. n( k) is a if and only if k = n or k | (n).

α ζ 2αi ζ αi. Proof. Choose so that k = e and then set 2k = e A quick calculation shows

ζd − ζd α. k 1 = 2i 2k sin d

Φ First suppose that k /| n. Using the definition of n we see that

d µ(n/d) d µ(n/d) Φ(ζ = Π ζ − Π ζ α n ) ( 1) = ( 2i sin d ) k d | n k d | n 2k

Σ µ(n/d) Σ d µ(n/d) µ(n/d) = ( 2i ) ζ Π ()sin dα 2k d | n

φ µ Φ(ζ = ζ (n) Π α (n/d) n ) ()sin d k 2k d | n

(here the sums, like the products, are taken over the divisors d of n). This shows that φ(n) Φ (ζ ) = ζ F (α) where F (α) is a real valued function. Thus Φ (ζ ) is real if and only if n k 2k n n n k φ(n) ζ is real, which happens if and only if k | φ(n). 2k Now suppose k | n,

k d µ(n/d) Φ (X) = Φ ( X ) ( X − 1 ) n n/k Π d | n k /| d so arguing as above,

φ(n) − kφ(n/k) µ(n/d) Φ (ζ ) = Φ (1) ζ ( sin αd ) . n k n/k 2k Π d | n k /| d Φ (ζ Φ φ − φ Here n k) is real iff either n/k(1) = 0 (that is, n = k) or k | ( (n) k (n/k)), proving the theorem.

Now that we know k | Lφ(R) is necessary, we give several sufficient conditions, starting with the theorem quoted in the previous section (properly rephrased):

α Theorem 2. Let n > 1 be an integer and write n = Π p i (where the p are distinct primes). Set i i Π Φ ζ R = pi and n = LR. Let p be any prime divisor of n. n( k) = 1 for all k such that

(i) k | L whenever R is not a prime, (ii) k | 2L, k /| L whenever R is not 2 or twice a prime, (iii) k | (p−1)L whenever pk =/ (k,L)R. (iv) k | ((p+1),φ(R/p))L whenever pk =/ (k,L)R.

Φ Φ L PROOF. For all X we have n(X) = R(X ), so for any integer k and any primitive kth root of ζ Φ ζ Φ ζL Φ ζ Φ 1 unity k we have n( k) = R( k). If k | L and R is not a prime power, then n( k) = R( ) = Φ ζ Φ −1 1, giving (i). If k | 2 L but k /| L, then n( k) = R( ) which is 1 if R is not 2 or twice an odd prime. This, with (i), shows (ii). Now suppose p is any prime dividing R. When the denominator is not zero we have Φ pL R/p(X ) Φn(X) = , Φ L R/p(X ) so if k divides pL−L, and pk =/ (k,L)R, then pL L ΦR/p(ζ ) ΦR/p(ζ ) Φ ζ k k n( k) = = = 1, Φ ζL Φ ζL R/p( k) R/p( k) + Φ showing (iii). Finally, if instead k divides pL L (and again pk =/ (k,L)R), then because R/p is a we have − Φ ζ L R/p( ) − φ Φ ζ k ζ L (R/p) n( k) = = . Φ ζL k R/p( k)

This quotient will be one if k | Lφ(R/p), which is (iv).

It is interesting to note that the simple criteria of the above theorem accounts for almost all of Φ ζ Φ ζ the small solutions to n( k) = 1. For example, of the 21206 solutions to n( k) = 1 with n < 2000, this theorem omits only the following eighteen solutions:

(n,k) = (385,24), (455,24), (627,24), (770,24), (910,24), (1105,24), (1155,24), (1254,24), (1295,24), (1365,24), (1419,24), (1540,48), (1705, 24), (1729,24), (1820,48), 1881,72), (1925,24), (1925,120).

(These 21206 solutions were found using a Mathematica program.) All of the solutions listed above are among those found by the following results.

≡ ≡ Φ ζ Corollary 3. Let p 19, q 11 (mod 24), and suppose 3pq | n; then n( k) = 1 for all k | 24L except when k/(k,L) = 8.

Φ ζ Φ ζ (For example, 3.11.19.m( 24) = 3.19.83.m( 24) = 1 for all positive m not divisible by 3.)

Φ ζ Proof. Theorem 2 shows 3.11.19( k) = 1 for k = 1, 2, 3, 4, 6 and 12; and it is easy to check Φ ζ Φ ζ that 3.11.19( k) = 1 for k = 24 but not for k = 8, so it follows that 3pq( k) = 1 (k | 24, k =/ 8). Φ ζ Φ ζr Φ ζ Φ ζ Next, for all primes r | R, we have R( k) = R/r( k)/ R/r( k), so it follows that R( k) = 1 whenever 3pq | R (with the same condition on k). Finally,

Φ ζ Φ ζL Φ ζ n( k) = R( k) = R( k/(k,L)) = 1

whenever k/(k,L) divides 24, but is not 8.

Theorem 4. Let p, q, and r be distinct primes dividing n. Write n = RL as above. If

k | (p2−1, q2−1, pqr−1)L or k | (p2−1, q2−1, pqr+1, Lφ(R/r))L,

Φ ζ then n( k) = 1.

Φ ζ Φ ζ Φ ζ Φ ζ (For example, 5.7.11.m( 24) = 5.13.17.m( 24) = 5.11.13.m( 24) = 5.7.17.m( 24) = 1 for all positive integers m.)

Proof. Let k be any divisor of (p2−1, q2−1, pqr−1). By the choice of k, we have the following congruences

1.r ≡ pq, p.r ≡ q, q.r ≡ p, pq.r ≡ 1 (mod k).

That is, by r just permutes the following sets modulo k.

A+(pq) = { d | pq : µ(d) = 1 } A−(pq) = { d | pq : µ(d) = −1 }

Now let s be any other prime divisor of n, (s /| pqr). Again multiplication by r will just permute the two sets A±(pqs) ... so this is true for the sets A±(R/r). Thus

rd d ζ − ζ − Π ( k 1) Π ( k 1) d ε A (R/r) d ε A (R/r) + = + .

rd d ζ − ζ − Π ( k 1) Π ( k 1) d ε A−(R/r) d ε A−(R/r)

r r which shows Φ (ζ ) = Φ (ζ ) and Φ (ζ ) = Φ (ζ )/Φ (ζ ) = 1. Finally, R/r k R/r k R k R/r k R/r k L Φ (ζ ) = Φ (ζ ) is one iff Φ (ζ ) is, which we have shown happens when k/(L,k) divides n k R k R k/(L,k) (p2−1, q2−1, pqr−1), completing the proof of the first case. If instead we have that k | (p2−1, q2−1, pqr+1), then multiplication permutes and changes the sign of the elements in the lists A±, so we conclude (almost as above)

r −1 −φ(R/r) Φ(ζ ) = Φ (ζ ) = ζ Φ (ζ ) R/r k R/r k k R/r k

(m -free, relatively prime to pqr) and

r −φ(R/r) Φ (ζ ) = Φ (ζ )/Φ (ζ ) = ζ n k R/r k R/r k k

completing the proof in the second case.

Theorem 5. Let p, q and r be distinct primes dividing n, with p and q odd. Write n = RL as above. If

k | (q ± 1, r(p ±' 1), φ(rpq)/2) L, k /| rpq

Φ ζ then n( k) = 1.

Φ ζ Φ ζ (For example, 7.23.71.m( 24) = 19.47.73.m( 24) = 1 for all positive integer m.)

− − Proof. If 2k | (q ± 1), then (1, pq) ≡ ( + q, + p) (mod 2k). If instead k | (q ± 1) but 2k /| (q ± 1), − − p =/ 2, then (1, pq) ≡ (k + q, k + p) (mod 2k). Either way,

π pqπ pπ qπ sin sin = sin sin . k k k k

Similarly, k | r(p ±' 1), q =/ 2, implies

rpπ rqπ rπ rpqπ sin sin = sin sin . k k k k φ µ Φ ζ ζ (rpq) Π π (rpq/d) Together these show rpq( k) = ()sin d /k = 1. 2k d | rpq

π π π π (Note that the problem of finding all rational solutions to sin x1 sin x2 = sin x3 sin x4 has been completely solve by Myerson [14].)

Mathematics and Computer Science University of Tennessee at Martin Martin, TN 38238 E-mail address: [email protected]

REFERENCES

1. A. O. L. ATKIN & F. MORAIN, “Elliptic curves and primality proving,” Math. Comp., 61 (1993) 29-68. 2. A. BJÖRN & H. RIESEL, “Factors of generalized Fermat numbers,” preprint. 3. R. P. BRENT, Factor: an program for the IBM PC, Report TR-CS-89- 23, Computer Sciences Laboratory, Australian National University, Oct. 1989. 4. J. BRILLHART, et al., Factorizations of bn±1, b = 2,3,5,6,7,10,11,12 up to high powers, American Mathematical Society, 1988. 5. . CALDWELL, “Unique Period Primes,” J. Rec. Math., to appear. 6. , “The Dubner PC Cruncher - a microcomputer coprocessor card for doing integer arithmetic,” J. Rec. Math., 25:1 (1993) 56-57. 7. C. CALDWELL & S. YATES, “The known factors of Rn (1 < n < 3000),” unpublished. 8. H. DUBNER, private correspondence, 23 April 94. 9. , “Generalized repunit primes,” Math. Comp., 61 (1993), 927-930. 10. H. DUBNER & R. DUBNER, “The development of a powerful low-cost computer for applications,” J. Rec. Math., 18:2 (1985-86) 81-86. 11. H. DUBNER & W. KELLER, “Factors of generalized Fermat numbers,” Math. Comp. 64 (1995) 397-405. 12. F. MORAIN, “Atkin's test: news from the front,” Advances in Cryptology - Proceedings of EUROCRYPT '89, Springer-Verlag Lecture Notes in Computer Science (1990) 626-635. 13. , private correspondence, 17 May 93. 14. G. MYERSON, “Rational products of sines of rational angles,” Aequationes Mathematicae, 45:1 (1993) 70-82. 15. I. Peterson, “Dubners’ primes--searching for twin primes and other denizens of number world,” Science News, November 20, (1993) 331. 16. P. RIBENBOIM, The new book of records, Springer-Verlag, New York, 1995, 350-354. 17. H. C. WILLIAMS, “Some primes with interesting digit patterns,” Math. Comp., 32 (1978) 1306−1310. 18. H. C. WILLIAMS & E. SEAH, “Some primes of the form (an−1)/(a−1),” Math. Comp. 33 (1979) 1337−1342. 19. H. C. WILLIAMS & H. DUBNER, “The primality of R1031,” Math. Comp., 47 (1986) 703−711. 20. H. C. WILLIAMS, “Primality testing on a computer,” Ars Combinatoria, 5 (1978) 127-185. n n 21. , “A note on the primality of 62 +1 and 102 +1,” Fib.Quart., 26 (1988) 296-305. 22. G. WOLTMAN, “The great internet Mersenne prime search” [Online], (1997, March 23) available http://www.mersenne.org/. 23. , “Mersenne Search Status” [Online], (1997, March 23) available http://www.mersenne.org/status.htm. 24. S. YATES, “Periods of unique primes,” Math. Mag., 53:5 (1980) 314. 25. , and Repetends, Star Publishing Co., Boyton Beach, Florida, 1982. 26. , “Period lengths of exactly one or two primes,” J. Rec. Math., 18:1 (1985-86) 22-24 and 22:4 (1990) 288.

Table 1. The Known Unique Prime Periods (decimal) and their Lengths # period n digits in p # period n digits in p # period n digits in p 1 1 1 20 134 66 39* 1752 577 2 2 2 21 150 41 40* 1812 601 3 3 2 22 196 84 41* 1836 577 4 4 3 23 294 84 42* 1844 920 5 9 6 24 317 317 43# 1862 757 6 10 4 25 320 128 44# 2134 961 7 12 4 26* 385 241 45* 2232 721 8 14 6 27 586 292 46* 2264 1128 9 19 19 28 597 396 47* [ 2667 1513 ] 10 23 23 29 654 217 48* 3750 1001 11 24 8 30* 738 241 49* [ 3903 2600 ] 12 36 12 31* 945 433 50* [ 3927 1920 ] 13 38 18 32 1031 1031 51* [ 4274 2136 ] 14 39 24 33* 1172 584 52* [ 4354 1861 ] 15 48 16 34* 1282 640 53* [ 6437 6240 ] 16 62 30 35* 1404 433 54* [ 6522 2173 ] 17 93 60 36# 1426 661 55* [ 6682 3073 ] 18 106 52 37* 1452 441 56* [ 8696 4344 ] 19 120 33 38* 1521 936 57* [ 9550 3801 ] Φ (10) Notes: The unique primes (except for n=1, p=3) are given by n . gcd(Φn(10),n) The primes whose periods are indicated by # were proven prime by Morain [13]. The primes whose periods are indicated by * were proven by the by author. The numbers in square brackets [ ] correspond to probable primes. All periods n < 10000 were tested.