advertisement

Applications of the Complex Roots of Unity Ghaith Hammouri University of Hartford In a class of differential equations, I saw an explicit function that generated a sequence of alternating 0’s and 1’s. The sequence was very useful, and I wondered what functions might produce other periodic sequences with longer strings of zeros. This paper introduces such formulas {Gk} using elementary complex analysis, which led to other functions that revealed information about prime decomposition of integers. Introduction Let {an} be a sequence of 0’s and 1’s. For any integer k, we say that {a n} has period k if 1 when k | n 0 otherwise an = For example, the sequence {0, 1, 0, 1, 0, 1,…} has period 2, and the sequence { 0, 0, 1, 0, 0, 1, …} has period 3. The function Gk Let Gk: N → {0, 1} be a sequence of period k. Our first goal is to find an expression that generates Gk. For example the following expression generates G2 : (-1)n (1) n 2 To find a generator for G3, notice that that the two complex roots of unity were used to form G2 , Extending this notice to three complex roots of unity: w - 1 3 _ i, w 2 2 - 1 3 i and 1, (See 2 2 Figure 1) we define G3 By: _ ( w) n ( w) n (1) n G3(n)= 3 Figure 1: The three complex roots of unity 1 These roots form an Abelian group under rotation by _ _ 2π radians generated by 1, w or w . Consequently, 3 _ if 3|n, then wn = w n = 1. Otherwise, wn + w n = -1. Therefore, the function G3 will yield 1 whenever n is a multiple of three, and zero otherwise: In either case, the roots form an Abelian group under rotation. For example, when k = 4 the complex roots of unity are 1, i, -1 and –i and the function G4 produces a sequence of period 4. G4(n)= (i) n (-i) n (1) n (-1) n 4 To extend these results recall that the kth roots of unity can be expressed as eiθ, where 2 . j ,j= k 0,1,2…k. Therefore, we have: k (e i( 2 j ) n k ) j 1 G k ( n) k For example, i G5 (n) = n (e 5 e 2i n 5 e 3i n 5 e 4i n 5 e 5i n 5 ) 5 We can use the identities eiθ = cos(θ) + i*sin(θ), cos(-x) = cos(x), sin(-x) = sin(x) and sin(2kπ) = 0 to rewrite these functions as: k G k ( n) 2 jn ) k k cos( j 1 The function, Gk can be extended to all real numbers. Then Gk is an even, periodic function that takes on the values 0 and 1 on the integers. For example, 2 jx ) 5 j 1 G5 ( x) 5 1 1 2 3 4 5 .(cos( .x) cos( .x) cos( .x) cos( .x) cos( .x)) 5 5 5 5 5 5 5 cos( In particular, G5 (2) 1 2 2 2 4 cos( 2 ) cos( 2 ) 0.2 0.3236... 0.1236... 0 5 5 5 5 5 2 G 5 ( 5) = 1 2 2 2 4 1 2 2 + cos( 5π ) + cos( 5π ) = + + = 1 5 5 5 5 5 5 5 5 The graphs of G4 and G5 are given in Fig’s 2 and 3. G4 Figure 2 G5 Figure 3 Since the roots of unity are symmetric about the x axis, we can reduce the calculations required to evaluate Gk. The reduced odd and even G functions are: k 1 2 k 2 2 j .n 1 2 cos( ) k j 1 Godd (n) k Geven (n) 1 cos( n ) 2 cos( j 1 2 j .n ) k k The two functions can both be joined to form a single term for the G function with reduced number of calculations: Gk (n) G2 (n).Geven (n) G2 (n 1).Godd (n) The S function: Figure 4 gives a table of values of Gk(x) for x and k = 1,..,12. Figure 4 For each integer x, the sum of numbers in the xth column is the number of divisors of x. Note that all of the prime values of x have two divisors. Define S: Reals → Reals by: x S ( x) Gk ( x) k 1 Therefore, for all integers x, S(x) is the number of divisors of x. Figure 4 show the graph of S(x) for x= 10..23.1 S(x): 10< x < 23 Figure 5 We note in passing that any prime number can be characterized as the integer solution of the following equation: P 2 Gk ( P) k 1 1 The shape of S(x) depends on the number of terms used to generate S, in this case 200 terms are used 3 PROPERTIES OF S 1. For any prime number P and any positive integer n, S(Pn) = n + 1. By definition, S ( P ) n Pn G k 1 k ( P n ) = the sum of the divisors of Pn = n + 1. 2. If and are relatively prime, S( . ) = S( ) . S( ) S(n) yields the number of integers that divide n. since and are relatively prime, they have no common non trivial divisors. Therefore the number of divisors of ( * ) will be the product of the number of divisors of and . Applications and Observations: 1. The Divisor function: L (x) 2 The divisor function 1 ( x) is a function that yields the sum of all the divisors of a certain integer. The function Gk(x) can be modified to yield a class of functions: x x k L ( x) (kGk ( x)) L (cos( k 1 k 1 n 1 2nx L )) k The divisor function is a special case of L (x) , which adds the divisors of x raised to the power L. We see that when L=1 we actually get the divisor function and when L =0 the function reduces to our original S function. 2. Periodical factorization: As we know any number can be represented as a product of its prime factors. The G function can be used to give a formula for the factorization of any integer n: GP n PLi 0 i L PL (n) L 1 Where PL is the Lth Prime number Notice that the G function simply tests the integer n for containing any PLi over all the integers (i), adding 1 each time such a factor is found. The expression is not of a lot of use as is; nevertheless the same formula can be modified in order to factor numbers that are a result of a defined sequence. A good example would be to factor all the integers of the form 2n-1 (see table below). If we were factoring n the number three as an example would appear as a factor every three terms (3, 6, 9..,) though as can bee seen from the table if we were factoring the terms of the sequence 2n-1, three appears every second term. The 2 More on this function can be found at: http://mathworld.wolfram.com/DivisorFunction.html 4 number of terms between the appearances of a certain prime factor is called its period, in the case where we are factoring n, the period happens to be the same as the prime factor itself, though when we factor the terms of the sequence 2n-1 the period noL is defined as n oL PL 1 , K is an integer. The period is also K equal to the number of the term in the sequence, which first contains the prime PL as a factor. Notice how the number 5 has a period of 4 (K = 1 for this case), 5 appears at n = 4, 8, 12, 16, 20… The following formula can be used to denote all the factors of the terms of such sequence. Gn 2 n 1 PLi 0 i oLPL (n) L 1 n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2n-1 (factored) 1 (3) (7) (3) (5) (31) (3)2 (7) (127) (3) (5) (17) (7) (73) (3) (11) (31) (23) (89) (3) 2 (5) (7) (13) (8191) (3) (43) (127) (7) (31) (151) (3) (5) (17) (257) (131071) (3) 3 (7) (19) (73) (524287) (3) (5) 2 (11) (31) (41) (7) 2 (127) (337) (3) (23) (89) (683) (47) (178481) (3) 2 (5) (7) (13) (17) (241) (31) (601) (1801) (3) (8191) (2731) (7) (73) (262657) (3) (5) (29) (43) (113) (127) (233) (1103) (2089) (3) 2 (7) (11) (31) (151) (331) Table1: 2n-1 factored Notice that the formula used to denote all integers n and that used to denote the terms of sequence 2n1both are almost identical with the only difference of PL being replaced with no in the G function. The source of interest in the numbers in this sequence comes from the fact that for some prime numbers p, 2P-1 yields a prime number, which is called a Mersenne prime. Relying on the previous formula, we can easily prove that the factors of a number of the form 2P-1 cannot be raised to a power higher than 1. 5 Proof: We will start by choosing the kth prime PK: Gn 2 PK 1 PLi 0 i oLPL ( PK ) L 1 i P oL L Now notice that G noLPLi ( PK ) will not yield zero if Since PK is a prime the previous statement can be true in one of two cases, if n oL PL =1, which is not possible because no can’t be equal to 1 since that would mean a repeating factor in all the terms of the sequence n divides PK. i 2n-1, which doesn’t exist. The second case when n i P P oL L K . Since PK is a prime, it can’t be written as a product of two numbers and therefore one of the terms on the left side has to be restricted to 1. noL can not be one as mentioned before, therefore to be equal to 1. The previous statement can only be true if and only if i = 0, in which case the sum i P L has G i 0 no LPLi ( PK ) will reduce to a single term, and therefore P L can only be raised to the power 1. Finally it might be useful to mention that such periodicity in prime factors is also observed for different sequences (3n-1, 5n-1, though it becomes more complicated to denote). Concluding: The G function is merely a selection function that adds a great help to writing expressions in a mathematical way, especially those expressions programmers use and that can only be denoted by a whole set of directions. By no means does the G or the S function save time for calculations in fact it could possibly add more time, nevertheless it provides an insight about certain expressions that were a great help to enhance my understanding of these concepts. 6 References: [1] World of mathematics http://mathworld.wolfram.com/DivisorFunction.html 7