(March 16, 004) Factorig x 1: cyclotomic ad Aurifeuillia polyomials Paul Garrett <garrett@math.um.edu> Polyomials of the form x 1, x 3 1, x 4 1 have at least oe systematic factorizatio x 1 = (x 1)(x 1 + x +... + x + x + 1) Equivaletly, polyomials like x y, x 3 y 3, ad x 4 y 4 have factorizatios x y = (x y)(x 1 + x y +... + xy + y 1 ) For odd, replacig y by y gives a variat x + y = (x + y)(x 1 x y +... xy + y 1 ) For composite expoet oe obtais several differet factorizatios x 30 1 = (x 15 ) 1 = (x 15 1)(x 15 + 1) x 30 1 = (x 10 ) 3 1 = (x 10 1)(x 0 + x 10 + 1) x 30 1 = (x 6 ) 5 1 = (x 6 1)((x 6 ) 4 +... + 1) Such algebraic factorizatios yield umerical partial factorizatios of some special large umbers, such as 33 1 = ( 11 ) 3 1 = ( 11 1)( + 11 + 1) 33 1 = ( 3 ) 11 1 = ( 3 1)( 30 +... + 1) Thus, 33 1 has factors 3 1 = 7 ad 11 1 = 3 89. It is the easier to complete the prime factorizatio 33 1 = 7 3 89 599479 But that largish umber 599479 might be awkward to uderstad. How do we verify that a umber such as N = 599479 is prime? That is, how do we show that N is ot evely divisible by ay iteger D i the rage 1 < D < N? Oe could divide N by all itegers D betwee 1 ad N, but this is eedlessly slow, sice if D evely divides N ad D > N the N/D is a iteger ad N/D < N. That is, we eed oly do trial divisios by D for D N. Ad, after dividig by, we eed oly divide by odd umbers D thereafter. Also, we eed oly divide by primes, if coveiet. For example, sice N = 101 is ot divisible by the primes D =, 3, 5, 7 o larger tha 101 10, we see that 101 is prime. Cogrueces: Recall that a = b mod m 1
meas that m divides a b evely. Thus, for example, 6 = 1 mod 5 10 = 1 mod 11 35 = 101 mod 977 Oe might worry that i the prime factorizatio 33 1 = 7 3 89 599479 the large umber 599479 is left over after algebraic factorig. But Fermat ad Euler proved that a prime factor p of b 1 either divides b d 1 for a divisor d < of the expoet, or else p = 1 mod. Sice here the expoet 33 is odd, ad sice primes bigger tha are odd, i fact we ca say that if a prime p divides 33 1 ad is ot 7, 3, 89, the p = 1 mod 66. Thus, i testig 599479 for divisibility by D 599479 774 we do ot eed to test all odd umbers, but oly 67, 133, 199,... ad oly eed to do 599479/66 11 trial divisios to see that 599479 is prime. So 1 is ot prime uless the expoet is prime. For p prime, if p 1 is prime, it is a Mersee prime. Not every umber of the form p 1 is prime, eve with p prime. For example, 11 1 = 3 89 3 1 = 47 178481 9 1 = 33 1103 089 37 1 = 3 616318177 41 1 = 13367 164511353 Nevertheless, usually the largest kow prime at ay momet is a Mersee prime, such as 697593 1 Theorem (Lucas-Lehmer) Let L o = 4, L = L 1. For p a odd prime, p 1 is prime if ad oly if L p = 0 mod p 1 We wat the complete factorizatio of x 1 ito irreducible polyomials with ratioal coefficiets (which caot be factored further without goig outside the ratioal umbers). The irreducible factors are cyclotomic polyomials. For example, x 18 1 = (x 1)(x + 1)(x + x + 1)(x x + 1)(x 6 + x 3 + 1)(x 6 x 3 + 1) has familiar-lookig factors, but x 15 1 = (x 1)(x + x + 1)(x 4 + x 3 + x + x + 1)(x 8 x 7 + x 5 x 4 + x 3 x + 1)
has a ufamiliar factor. How do we get all these? For complex α the polyomial x α is a factor of x 1 if ad oly if α = 1. This happes if ad oly if α = cos πk πk + i si = eπik/ for some k = 0, 1,,..., 1. These are th roots of uity, ad they accout for the complex roots of x 1 = 0. Amog the th roots of uity are d th roots of uity for divisors d of. For example, amog the 6 th roots of uity are square roots ad cube roots of 1 also, ot to metio 1 itself. A th root of uity is primitive if it is ot a d th root of uity for ay d < dividig. The primitive complex th roots of uity are cos πk πk + i si = eπik/ with 0 < k < ad gcd(k, ) = 1. Ideed, if gcd(k, ) = d > 1, the sice d divides k evely. For example, the primitive complex 6 th roots of 1 are (e πik/ ) (/d) = e πik/d = 1 e πi 1/6 e πi 5/6 The primitive complex 10 th roots of 1 are e πi 1/10 e πi 3/10 e πi 7/10 e πi 9/10 Oe defiitio of the th cyclotomic polyomial Φ (x) is Φ (x) = (x α) α primitive th root of 1 This does ot make immediately clear that the coefficiets are ratioal, which they are. immediately clear how to compute the cyclotomic polyomials from this. It is also ot But this defiitio does give the importat property x 1 = d Φ d (x) where d meas that d divides evely. A aive computatioal approach comes from the idea that roots α of Φ (x) = 0 should satisfy α 1 = 0 but ot α d 1 = 0 for smaller d. Thus, for prime p ideed Φ p (x) = xp 1 x 1 = xp 1 + x p +... + x + x + 1 3
We might try Paul Garrett: Factorig x 1: cyclotomic ad Aurifeuillia polyomials (March 16, 004) Φ (x) = But this is ot quite right. For example, Φ 6 (x) x 1 x d 1 for d < dividig (?) x 6 1 (x 1)(x 1)(x 3 1) shows that this attempted defiitio tries to remove more factors of x 1 that there are i x 6 1. Correctig this, Φ 6 (x) = (x 6 1) 1 (x 6/ 1)(x 6/3 1) (x6/6 1) = (x6 1)(x 1) (x 3 1)(x 1) = x x + 1 That is, we iclude all 6 th roots of uity, take away those which are cube roots or square roots, ad put back those we have couted twice, amely 1. Similarly, (x 30 1) 1 (x 15 1)(x 10 1)(x 6 1) (x5 1)(x 3 1)(x 1 1) (x 1) = (x30 1)(x 5 1)(x 3 1)(x 1) (x 15 1)(x 10 1)(x 6 1)(x 1) = x8 + x 7 x 5 x 4 x 3 + x + 1 That is, we iclude all 30 th roots of uity, take away 15 th, 10 th, ad 6 th roots, put back those we have couted twice, amely 5 th, cube, ad square roots, ad the take away agai those we ve couted 3 times, amely 1. Systematically icorporatig the idea of compesatig for over-coutig we have the correct expressio Φ (x) = (x 1 1) prime p (x/p 1) distict primes p,q (x /pq 1 1) distict primes p,q,r (x/pqr 1)... Usig the property x 1 = d Φ d (x) gives a more elegat approach, by rearragig: x 1 Φ (x) = d, d< Φ d(x) By iductio, if Φ d (x) has ratioal coefficiets for d <, the so does Φ (x). Also, iductively, if we kow Φ d (x) for d < the we ca compute Φ (x). Groupig helps. For example, Φ 15 (x) = x 15 1 Φ 1 (x)φ 3 (x)φ 5 (x) = x 15 1 Φ 3 (x)(x 5 1) = x10 + x 5 + 1 = x10 + x 5 + 1 Φ 3 (x) x + x + 1 = x8 x 7 +x 5 x 4 +x 3 x+1 by direct divisio at the last step. We ca be a little clever. For example, x 30 1 Φ 1 (x)φ (x)φ 3 (x)φ 5 (x)φ 6 (x)φ 10 (x)φ 15 (x) 4
Use to simplify to Use to get Paul Garrett: Factorig x 1: cyclotomic ad Aurifeuillia polyomials (March 16, 004) x 15 1 = Φ 1 (x)φ 3 (x)φ 5 (x)φ 15 (x) x 30 1 Φ (x)φ 6 (x)φ 10 (x)(x 15 1) = x 15 + 1 Φ (x)φ 6 (x)φ 10 (x) x 10 1 = Φ 1 (x)φ (x)φ 5 (x)φ 10 (x) x 15 + 1 Φ (x)φ 6 (x)φ 10 (x) = (x 15 + 1)Φ 1 (x)φ 5 (x) Φ 1 (x)φ (x)φ 5 (x)φ 10 (x) Φ 6 (x) = (x15 + 1)(x 5 1) Φ 6 (x)(x 10 1) = (x15 + 1) Φ 6 (x)(x 5 + 1) = (x10 + x 5 + 1) x = (x10 x 5 + 1) x + 1 x = x 8 + x 7 x 5 x 4 x 3 + x + 1 x + 1 by direct divisio at the last step. Based o fairly extesive had calculatios, oe might suspect that all coefficiets of all cyclotomic polyomials are either +1, 1, or 0, but this is ot true. It is true for prime, ad for havig at most distict prime factors, but ot geerally. The smallest where Φ (x) has a exotic coefficiet is = 105. It is o coicidece that 105 = 3 5 7 is the product of the first 3 primes above. = Φ 105 (x) = x 105 1 Φ 1 (x)φ 3 (x)φ 5 (x)φ 7 (x)φ 15 (x)φ 1 (x)φ 35 (x) = x 105 1 Φ 3 (x)φ 15 (x)φ 1 (x)(x 35 1) x 70 + x 35 + 1 Φ 3 (x)φ 15 (x)φ 1 (x) = (x70 + x 35 + 1)(x 7 1) Φ 15 (x)(x 1 = (x70 + x 35 + 1)(x 7 1)Φ 1 (x)φ 3 (x)φ 5 (x) 1) (x 15 1)(x 1 1) = (x70 + x 35 + 1)(x 7 1)(x 5 1)Φ 3 (x) (x 15 1)(x 1 1) Istead of direct polyomial computatios, we do power series computatios, imagiig that x < 1, for example. Thus, 1 x 1 1 = 1 1 x 1 = 1 + x1 + x 4 + x 63 +... We aticipate that the degree of Φ 105 (x) is (3 1)(5 1)(7 1) = 48 (why?). We also observe that the coefficiets of all cyclotomic polyomials are the same back-to-frot as frot-to-back (why?). Thus, we ll use power series i x ad igore terms of degree above 4. Thus Φ 105 (x) = (x70 + x 35 + 1)(x 7 1)(x 5 1)(x + x + 1) (x 15 1)(x 1 1) = (1 + x + x )(1 x 7 )(1 x 5 )(1 + x 15 )(1 + x 1 ) = (1 + x + x ) (1 x 5 x 7 + x 1 + x 15 x 0 + x 1 x ) = 1+x+x x 5 x 6 x 7 x 7 x 8 x 9 +x 1 +x 13 +x 14 +x 15 +x 16 +x 17 x 0 x 1 x +x 1 +x +x 3 x x 3 x 4 = 1 + x + x x 5 x 6 x 7 x 8 x 9 + x 1 + x 13 + x 14 + x 15 + x 16 + x 17 x 0 x x 4 Lookig closely, we have a x 7. I fact, Φ (x) caot be factored further usig oly ratioal coefficiets. For prime p, this follows from Eisestei s criterio: for f(x) with iteger coefficiets, highest-degree coefficiet 1, all lower-degree coefficiets divisible by p, ad costat term ot divisible by p, f(x) caot be factored (with ratioal coefficiets). 5
For example, Φ 5 (x) = x 4 + x 3 + x + x + 1 itself does ot have the right kid of coefficiets, but a variatio does: Φ 5 (x + 1) = (x + 1)5 1 (x + 1) 1 = x4 + 5x 3 + 10x + 10x + 5 Ad Φ 7 (x + 1) = (x + 1)7 1 (x + 1) 1 = x6 + 7x 5 + 1x 4 + 35x 3 + 35x + 1x + 7 Less well kow are Lucas-Aurifeullia-LeLasseur factorizatios such as x 4 + 4 = (x 4 + 4x + 4) (x) = (x + x + )(x x + ) More exotic are ad ad further x 6 + 7 x + 3 = (x + 3x + 3)(x 3x + 3) x 10 5 5 x 5 = (x4 + 5x 3 + 15x + 5x + 5) (x 4 5x 3 + 15x 5x + 5) x 1 + 6 6 x 4 + 36 = (x4 + 6x 3 + 18x + 36x + 36) (x 4 6x 3 + 18x 36x + 36) x 14 + 7 7 x + 7 = (x6 + 7x 5 + 1x 4 + 49x 3 + 147x + 343x + 343) (x 6 7x 5 + 1x 4 49x 3 + 147x 343x + 343) These Aurifeuillia factorizatios yield further factorizatios of special large umbers, such as ad similarly + 1 = 4 ( 5 ) 4 + 1 = (( 5 ) + ( 5 ) + 1)(( 5 ) ( 5 ) + 1) = 113 1985 = 113 5 397 3 33 + 1 3 11 + 1 = 7 (35 ) 6 + 1 3 (3 5 ) + 1 = (3(35 ) + 3(3 5 ) + 1)(3(3 5 ) + 3(3 5 ) + 1) = 7 5411 176419 Where do these come from? For a odd prime p Φ p (x ) = (x ) p 1 Φ 1 (x ) Replacig x by p x i this equality gives = (xp 1)Φ p (x) Φ 1 (x)φ (x)φ p (x) = Φ p(x)φ p (x) Φ p (px ) = Φ p ( p x)φ p ( p x) The factors o the right-had side o loger have ratioal coefficiets. But their liear factors ca be regrouped ito two batches of p 1 which do have ratioal coefficiets, ad these are the Aurifeuillia factors of Φ p (px ). From Galois theory, usig p = 1 mod 4, for ζ = e πi/p, p is a Gauss sum p 1 p = k=1 ( ) k ζ k Q(ζ) p 6
( ) with quadratic symbol = ±1 depedig whether k is a square mod p or ot. The automorphisms of Q(ζ) over Q are for a Z/p, ad The k p Φ p (px ) = ( k p ) =1 σ a : ζ ζ a σ a ( p) = p ( ) a p ( p x ζ k ) ( k p ) = 1 ( p x ζ k ) is the Aurifeuillia factorizatio ito two factors with ratioal coefficiets. To compute the Aurifeuillia factors? From the Galois theory view, it turs out that there are polyomials f(x) ad g(x) with ratioal coefficiets such that Φ p (x) = f(x) ± pxg(x) with +1 for p = 1 mod 4, 1 for p = 3 mod 4. The replacig x by px gives a differece of squares, which factors For example, The Ad Φ p ( px ) = f( px ) p x g( px ) = ( f( px ) pxg( px ) ) ( f( px ) + pxg( px ) ) Φ 3 (x) = x + x + 1 = (x + 1) 3x Φ 3 (3x ) = (3x + 1) 9x = (3x + 3x + 1) (3x 3x + 1) Φ 5 (x) = x 4 + x 3 + x + x + 1 = (x + 3x + 1) + 5x(x + 1) The latter igrediets are ot so hard to determie. If we kow x 4 + x 3 + x + x + 1 = f(x) + 5xg(x) it is reasoable to take f(x) = x + ax ± 1 ad try to fid parameter a so that f(x) differs from Φ 5 (x) by some 5xg(x). (x + ax + 1) Φ 5 (x) = (a 1)x + (1 + a )x + (a 1) x Tryig a = 0, 1,,... yields a good result for a = 3: 5x + 10x + 5 = 5(x + 1) Refereces: Has Riesel, Prime Numbers ad Computer Methods for Factorizatio, page 309 ff. Brillhart, Lehmer, Selfridge, Tuckerma, Wagstaff Factorizatio of b ± 1, b =, 3, 5, 6, 7, 10, 11, 1 up to High Powers. R.P. Bret O computig factors of cyclotomic polyomials, Math. of Comp. 61, 1993. http://www.math.um.edu / garrett/m/umber theory/aurifeuillia.pdf 7