THE 2ADIC, BINARY AND DECIMAL PERIODS OF 1/3 k APPROACH FULL COMPLEXITY FOR INCREASING k


 Darren Cole
 2 years ago
 Views:
Transcription
1 #A28 INTEGERS 12 (2012) THE 2ADIC BINARY AND DECIMAL PERIODS OF 1/ k APPROACH FULL COMPLEXITY FOR INCREASING k Josefina López Villa Aecia Sud Cinti Chuquisaca Bolivia Peter Stoll Villa Aecia Sud Cinti Chuquisaca Bolivia Received: 2/28/11 Revised: 12/10/11 Accepted: /2/12 Pulished: 4/18/12 Astract An infinite word x over an alphaet with letters has full complexity if for each m N all the m words of length m are factors of x We prove that the periods of ±1/ k in the 2adic expansion approach full complexity for increasing k: For any m N the periods for k > (m + 1)ln(2)/ln() have complexity 2 m Amazingly these 2 m words occur in the period almost the same numer of times On the way first we prove the same for the inary period We get a similar result for the decimal period of 1/ k 1 Introduction Let Z 2 denote the ring of 2adic integers Each x Z 2 can e expressed uniquely as an infinite string x 0 x 1 x 2 of 1 s and 0 s The x k are the digits of x written from left to right For instance 1 = 1111 and 1 = 1000 since = 0 The 2adic norm 2 in Z 2 is given y x 2 := 2 n if x 0 where x n is the first nonzero digit of x and x 2 := 0 if x = 0 Let 0 d 0 < d 1 < d 2 < e a finite or infinite sequence of nonnegative integers defined y d i := k whenever x k = 1 for a 2adic integer x = x 0 x 1 x k Then x can e written as the finite or infinite sum x = 2 d0 + 2 d1 + 2 d2 + The x + 1 map T is defined on the 2adic integers Z 2 y T (x) = x/2 for even x and T (x) = (x + 1)/2 for odd x Let T k (x) denote the kth iterate of T and T 0 (x) := x The sequence (T k (x) mod 2) k=0 is called the parity vector of x Z 2 (Lagarias []) The parity vector can e regarded
2 INTEGERS: 12 (2012) 2 as the 2adic integer v x = (T k (x) mod 2) 2 k k=0 Conversely each x Z 2 is uniquely determined y its parity vector v x Indeed there is an explicit formula (Bernstein [1]): x = Φ(v x ) where Φ(2 d0 + 2 d1 + 2 d2 + ) := i 0 1 i+1 2di (1) The periodicity conjecture of the famous x + 1 prolem states that the parity vector v x is eventually periodic for all x Z 2 (Bernstein Lagarias [2]) This conjecture is still open If the parity vector of some x Z 2 is eventually periodic then x = Φ(v x ) is also eventually periodic This follows from (1) y computing the corresponding geometric series using the 2adic norm For instance 1/ = since = 1/(1 4) If the periodicity conjecture is true Φ maps each aperiodic v x onto an aperiodic 2adic integer x Z 2 In a former paper ([5]) we calculated Φ(v x ) over a Sturmian word (the digits of v x are Sturmian) These aperiodic words are very similar to the periodic words y their almostperiodicity We accumulated evidence that Φ(v x ) is an infinite word of full complexity That was reason enough for searching more in this direction George Pólya in his famous ook How to solve it suggested that When you can t solve a prolem and we cannot prove the periodicity conjecture then there is an easier prolem you can solve: find it That is what we did We prove that the terms 2 di / i+1 added in (1) approach full complexity for increasing i The complexity function of a word x counts for each nonnegative integer m 0 the numer P (x m) of different factors of length m in x 1 The numer P (x 1) counts the different letters appearing in x In our case the alphaet is {0 1} so P (x 1) = 2 If x is purely periodic with a period of length m we have P (x m) = m If x is Sturmian we have P (x m) = m+1 for every m 0 (Lothaire [6]) An infinite word x over {0 1} has full complexity if for every nonnegative integer m all the 2 m words of length m are factors of x We prove that for every m N the period p of 1/ i+1 has complexity P (x m) = 2 m for all (i + 1) > (m + 1)ln(2)/ln() The d i s in (1) introduce d i leading 0 s for each 1/ i+1 In this sense our est result is Corollary 4 which gives the necessary and sufficient condition for complexity 2 m Luckily there is a helpful relation etween the 2adic and the inary expansion for reduced fractions with odd denominator of the unit interval This relation is given y Lemma 19 in Section 4: The 2adic period of 1/ i+1 is the reversal of the inary period of +1/ i+1 Therefore the main part of this paper is in Section where we study the inary expansion of 1/ k The transcription from inary to 2adic periods is in Section 4 and our main result appears there as Corollary 4 of 1 Lothaire [6] A word f is called a factor of a word x if there exist words u v such that x = ufv
3 INTEGERS: 12 (2012) Theorem 1 Most things we deal with in Section are well known facts of elementary arithmetic and the recursive method used there can e generalized to other ases and also to other fractions 1/p in ase 10 for primes p different from 2 and 5 As such an application should e seen Section 5 where we study the decimal expansion of 1/ k The main tool for estalishing conditions for complexity is Proposition 2 in Section 6 2 Results Theorem 1 Let k N and m N \ {1} The set X m (k) of words with length m in the inary expansion of 1/ k has 2 m elements if and only if k k 0 where k 0 = (m + 1) ln(2) ln() All these 2 m words can e found in the enlarged period p k := p k (0) m 1 which is the period p k of 1/ k concatenated with the first m 1 zeros of p k The words n X m (k) k k 0 occur in p k with almost the same frequency f(n): 2 f(n) f(n ) 2 for all n n X m (k) Theorem 2 Let k k 0 and m e as in Theorem 1 If k > k 0 then the inary period p k of 1/ k has complexity 2 m Theorem The inary period of 1/ k has the following properties: p k = x 1 x 2 x i x lk (l k = 2 k 1 ) 1 The digits are given y x i = (2 i mod k ) mod 2 or equivalently the digit x i is 1 if and only if the remainder 2 i mod k is odd 2 The numer n 0 of 1 s at an even position exceeds the numer n 1 of 1 s at an odd position y 1: n 0 n 1 = 1 The word p k has the same numer of 1 s and 0 s 4 The right half of p k is complementary to the left half of p k : x i+lk /2 + x i = 1 (0 i l k /2) 5 In the left half of p k the numer of 1 s at an even position is equal to the numer of 1 s at an odd position 2 The frequency f(n) is the numer of times a given word n occurs as factor of the enlarged period
4 INTEGERS: 12 (2012) 4 6 There are exactly k ln()/ln(2) leading 0 s in p k Corollary 4 Let k N and m N \ {1} The set X m (k) of words with length m in the 2adic expansion of 1/ k has 2 m elements if and only if k k 0 where k 0 = (m + 1) ln(2) ln() All these 2 m words can e found in p k := (0) m 1 p k which is the period p k of 1/ k extended to the left y m 1 zeros The words n X m (k) k k 0 occur in p k with almost the same frequency f(n): f(n) f(n ) 2 for all n n X m (k) Corollary 5 Let k k 0 and m e as in Corollary 4 If k > k 0 then the 2adic period p k of 1/ k has complexity 2 m Corollary 6 Let k k 0 and m e as in Corollary 4 Let p + k e the period of the (not purely periodic) 2adic expansion 1/ k = 1p + k p+ k If k > k 0 then the 2adic period p + k has complexity 2m Theorem 7 Let k N and m N The set X m (k) of words with length m in the decimal expansion of 1/ k has 10 m elements if and only if k k 0 where k 0 = m ln(10) + 2 ln() All these 10 m locks of m digits can e found in the enlarged period u k := u k (0) m 1 which is the period u k of 1/ k concatenated with the first m 1 zeros of u k The words n X m (k) k k 0 occur in u k with almost the same frequency f(n): f(n) f(n ) 1 for all n n X m (k) Corollary 8 Let k k 0 and m e as in Theorem 7 If k > k 0 then the decimal period u k of 1/ k has complexity 10 m The Binary Expansion In this section we use the standard notation for numers in ase 2 with the most significant digit at the left For instance 1101 = = 1 and = = 1/16 The inary expansion of 1/ k is a purely periodic fraction The period is a word p k = x 1 x 2 x i x lk (l k = 2 k 1 ) If m = 1 then (0) m 1 := ɛ (the empty word)
5 INTEGERS: 12 (2012) 5 of digits 0 and 1 with length l k = 2 k 1 : 1 k = x i 2 i = 2lk i=1 2 l k 1 lk i=1 x i 1 2 i (2) For example p 1 = 01; p 2 = ; p = ; p 4 = We get the period p k+1 dividing 1/ k y executing a long division y the inary integer 11 As l k+1 = l k we write the word p k three times uilding the word p k p k p k as dividend to otain the full period p k+1 The long division in short form looks like this: y 1 y i y lk y 1 y i y l k y 1 y i y l k 11 ) x 1 x i x lk x 1 x i x l k x 1 x i x l k r 1 r i r lk r 1 r i r l k r 1 r i r l k The divisor 11 and the dividend p k p k p k are in the second line The quotient is in the first line where the 0 has een omitted At each step after ringing down the next x i we have a remainder r i These remainders are in the third line We define r 0 := 0 at the start of the division Note that x i = x i = x i for each i L k where L k := {1 2 l k } There are only three possile remainders less than 11: {0 1 10} Therefore {r i r i r i } {0 1 10} Oviously r It is a simple ut important fact that the remainders r i r i of (0 1 10) l k = 0 Since l k+1 = l k r lk 0 and r l k 0 are a permutation and r i Lemma 9 Let L k := {1 2 l k } and i L k The sequence (r i r i r i ) is a permutation of (0 1 10) Proof (a) The Lemma holds for i = l k When ringing down the first digit x 1 of p k we take care of the previous remainder r lk 0 If r lk = 1 the division continues y dividing the inary integer 1x 1 = x y 11 If r lk = 10 then we continue with 10x 1 = x The division can e done y ringing down a single digit x 1 ut also y ringing down two or more digits in one step When we ring down all the digits of p k in one step the division y 11 continues with the inary integers 1x 1x 2 x l k = 1 2 l k + x 1 x 2 x lk for r lk = 1 or 10x 1x 2 x l k = 1 2 l k l k + x 1 x 2 x lk for r lk = 10
6 INTEGERS: 12 (2012) 6 since p k = p k The new remainder is r l k in oth cases As l k is even we have 2 l k 1 (mod ) so that r l k 1 + r lk (mod ) for r lk = 1 and r l k 2 + r lk (mod ) for r lk = 10 Hence (r lk r l k r l k ) is either (1 10 0) or (10 1 0) () The Lemma holds for i < l k We have x 1 x 2 x i = x 1 x lk x 1 x i The remainder of the left side is r i The remainder of the right side is equal to the remainder of r lk x 1 x i where r lk is either 1 or 10 Dividing the inary integer r lk x 1 x i y we get the remainder r lk 2 i + r i modulo Hence r i r l k 2 i + r i (mod ) In the same way x 1 x i = x 1 x l k x 1 x i yields r i r l k 2 i + r i (mod ) There are 12 possiilities: r lk r l k r i r i r i i even i odd In all cases (r i r i r i ) is a permutation of (0 1 10) A word x of length m entirely contained in p k has two exact copies (x and x ) in the dividend p k p k p The input remainders k : x is factor of p k and x is factor of p k and r i 1 and also the output remainders r i+m 1 r i+m 1 r i 1 r i 1 and r i+m 1 are all different y Lemma 9 so that the corresponding words y y and y in the quotient are all different too It is convenient to use ase 10 numers Each word x of length m receives a list numer n from 0 to 2 m 1 which is its value when read as a ase 2 integer For instance if m = the list numer 6 is the word x = 110 When translating a list numer ack into a word we take care of eventually leading 0 s For instance if m = 4 the list numer 5 is the word x = 0101 Dividing n y we get the quotient q which is the list numer of the word y The possile remainders are 01 and 2 We identify the words x or y with their respective list numers n or q for a given m N \ {1} We denote the set of list numers y M inary := {0 1 2 m 1} () Tale 1 shows the division y for any m N \ {1} The construction of Tale 1 is quite easy Write the list numers from 0 to 2 m 1 in the first column Write
7 INTEGERS: 12 (2012) 7 each of them three times consecutively in column 2 starting with (000) When column 2 is filled up continue with the remaining numers in column 4 and finally in column 6 Write the remainders (012) in this order filling up columns 5 and 7 r i 1 = 0 r i 1 = 1 r i 1 = 2 n q r i+m 1 q r i+m 1 q r i+m m 2 2m m mod (m + 1) mod m 1+2 2m n n n mod n+2m (n + 2 m ) mod n+2 2m (n m ) mod 2 m 1 2m 1 m mod 2 2 2m 1 (m + 1) mod 2 2m 1 2 Tale 1: M inary quotients and remainders Definition 10 Let m N \ {1} The set of triads for m is defined y { ( n n + 2 m n m ) } S inary := n M inary We exclude m = 1 ecause q {0 1} would generate two times the same numer in the triad For m > 1 the numers of the triad are all different Definition 11 Let m N \ {1} Let p = p k p k = x 1 x 2 e the infinite word of the inary expansion of 1/ k The enlarged period of 1/ k is the word p k = p k x 1 x 2 x m 1 We denote y X m (k) the set of (different) words of length m appearing in p In the context it will e clear if its elements are words or list numers identifying them Lemma 12 For each x X m (k) the word x is factor of p k Proof Let x = x i x i+m 1 X m (k) Take j := i mod l k If j 0 then x j x j+m 1 is factor of p k If j = 0 then i is the last digit in some p k and the word x lk x 1 x 2 x m 1 is factor of p k
8 INTEGERS: 12 (2012) 8 Let p k e the enlarged period of 1/ k for some m We determine the enlarged period p k+1 y executing the long division 11)p k p k p k = p k+1 We start with an example In Example 1 we divide the enlarged period p 2 of 1/9 y to get the enlarged period p of 1/27 We do this for m equal to 2 and 4 In the three cases the dividend elow the division line is p 2 p 2 p 2 and the quotient aove the division line is p The smaller numers are list numers which can e read in dividend and quotient y grouping the digits in locks of 2 or 4 digits corresponding to m Example 1 Consider For instance if m = we can read the following words in the dividend from left to right: The corresponding list numers are In the quotient we can read the list numers For m = the 7 in the dividend generates 2 7 and 5 in the quotient Indeed the list numer 7 generates the triad (257) in Tale 1 Note that these numers appear permuted In Example 1 we have X 2 () = {0 1 2 } = X 2 (2) Further X () = { } and X (2) = { } Finally X 4 () = { } and X 4 (2) = { } If m > 6 the words in the dividend (and also in the quotient) will e overlapping ecause the length of p 2 is 6 The example shows that X m (k) determines X m (k + 1) y means of tale 1 Proposition 14 We have { 2 m 2 2 m } X m (1) = where m N \ {1} Proof We have p 1 = 01 Let p := p 1 p 1 = x 1 x 2 Thus p 1 = p 1 x 1 x 2 x m 1
9 INTEGERS: 12 (2012) 9 There are only two words of length m: n (1) := 01 and n (2) := 10 oth of length m Word n (1) If m is odd then the last digit of n (1) is 0 Hence n (1) = m 2 We get n (1) = (2 m 2)/ So n (1) = 2 m / since 2 m 2 (mod ) If m is even then the last digit of n (1) is 1 Hence n (1) = m 2 We get n (1) = (2 m 1)/ = 2 m / since 2 m 1 (mod ) Word n (2) For odd m n (2) = m 1 = (2 m+1 1)/ = 2 m+1 / For even m n (2) = m 1 = (2 m+1 2)/ = 2 m+1 / Proposition 15 We have X m (k + 1) = { n n + 2 m n m } where k N m N \ {1} n X m(k) Proof We execute the long division 11)p k p k p k = p k+1 The words are identified y their list numers in M inary We use the notation n (i) and q (i) for words of length m having their first inary digit at position i The set of all words of length m in p k p k p k is given y X m (k) = {n (i) i L k } We have n (i) = n (i+l k) = n (i+2l k) Their input remainders r i 1 r i+lk 1 and r i+2lk 1 and also their output remainders r i+m 1 r i+lk +m 1 and r i+2lk +m 1 are all different y Lemma 9 It follows that the corresponding quotients q (i) q (i+l k) and q (i+2l k) are all different too Conversely if s (j) is a factor of length m in p k+1 for some j {1 2 l k } then s (j) {s (j mod l k) s (j mod l k+l k ) s (j mod l k+2l k ) } These factors are generated y n (j mod l k) = n (j mod l k+l k ) = n (j mod l k+2l k ) All these n s are equal to n (j) So X m (k + 1) = i L k {q (i) q (i+lk) q (i+2lk) } The q s are a permutation of ( n (i) / (n (i) + 2 m )/ (n (i) m )/) (Tale 1) Proposition 16 Let k N and m N \ {1} X m (k) = { t 2m k t 0 (mod ) and 0 < t < k } Proof Proposition 14 and Proposition 15 define a tree of triads Note that the two numers of X m (1) are elements of the triad generated y 0 in S inary Any n M inary generates the following tree of triads (we show only the levels k = 1 and k = 2): ( n n + 2 m n m ) { }} {{ }} {{ }} { n n + 2 m n m n m n m n m n m n m n m
10 INTEGERS: 12 (2012) 10 The k numers written at level k have the form (n + t 2 m )/ k where t {0 1 2 k 1}; eventually not all of them are different The left ranch of the tree corresponds to t 0 (mod ) the central ranch to t 1 (mod ) and the right ranch to t 2 (mod ) We sustitute n = 0 and cut off the left ranch All the remaining numers at level k are elements of X m (k) y Proposition 14 and Proposition 15 Note that card(x m (k)) 2 k Lemma 17 There is a unique t 0 2 (mod ) such that t 0 2m k t 0 2m k { 1 k 2 k } Proof The congruence t 2 m (mod k ) has the unique solution t 1/2 m (mod k ) and t 2 m (mod k ) has the unique solution t 2/2 m (mod k ) Hence t 2 m / k + 1/ k = t 2 m / k and t 2 m / k + 2/ k = t 2 m / k where t and t are taken as positive integers less than k Both are positive integers relatively prime to k Either t 1 (mod ) and t 2 (mod ) or t 2 (mod ) and t 1 (mod ) The claimed t 0 is either t or t Proposition 18 Let k N and m N \ {1} X m (k) = M inary if and only if 0 < 2m k < 1 2 Proof Let t 0 2 (mod ) e as in Lemma 17 Then t (mod ) and t is left out in X m (k) y Proposition 16 By Proposition 2 paragraph 1 { t2 m / k t {0 1 k 1}} = M inary if and only if 0 < 2 m / k < 1 As shown in the following figure we can avoid that the integer s := (t 0 + 1)2 m / k is left out in X m (k) y the condition 2 2 m / k < 1 + c/ k for the corresponding c {1 2} of Lemma 17 having now s = (t 0 + 2)2 m / k t 0 s t t }{{}}{{} c/ k 1 By Lemma 22 there is no other t 2 (mod ) such that t2 m / k is closer to (t2 m / k than for t 0 It follows that the condition 2 m+1 < k + c is necessary and sufficient to guarantee X m (k) = M inary Recall that m 2 and k 1 Oviously 2 m+1 = k is impossile We show that 2 m+1 = k +1 is impossile too Note that in this case m+1 is even since 2 m+1 1 (mod ) We get (2 (m+1)/2 1)(2 (m+1)/2 + 1) = k Only one of the consecutive integers (2 (m+1)/2 1) 2 (m+1)/2 and (2 (m+1)/2 + 1) is divisile y so either 2 (m+1)/2 1 = 1 and 2 (m+1)/2 + 1 = k or 2 (m+1)/2 1 = k and 2 (m+1)/2 + 1 = 1 We get the excluded value m = 1 (and k = 1) Hence 2 m+1 < k
11 INTEGERS: 12 (2012) 11 Proof of Theorem 1 By Proposition 18 X m (k) = M inary if and only if 0 < 2 m / k < 1/2 Thus k > (m + 1) ln(2)/ln() Hence k 0 = (m + 1) ln(2)/ln() The same condition yields m < k ln()/ln(2) 1 so m k ln()/ln(2) 1 The numer z of leading zeros in (2) is given y z = max{i 1/2 i > 1/ k } so z = k ln()/ln(2) Thus m 1 < z and p k = p k (0) m 1 All the 2 m words can e found in p k y Lemma 12 It remains to prove the last part of Theorem 1 We have k k 0 so X m (k) = M inary There is a q N such that k = q 2 m + r where 0 < r < 2 m Then q = k /2 m By Proposition 2 paragraph there are r different numers in M inary each of them occurring exactly q + 1 times in S 0 = ( t2 m / k ) k 1 t=0 ; each of the remaining 2 m r numers of M inary occurs exactly q times in S 0 Clearly 0 f(n) f(n ) 1 for all n n M inary By Propositions 16 and 18 when leaving out each third term of S 0 we get a sequence S 0 which also contains all the elements of X m (k) In any sequence with s elements y leaving out each third term we eliminate s/ or s/ elements as suggested in the following scheme (the crosses signify eliminated ): s: x x x x x x x x x x x Each numer n M inary repeats in S 0 either q or q + 1 times In S0 we have eliminated q/ or q/ elements for some n M inary occurring q times and (q + 1)/ or (q + 1)/ elements for another n M inary occurring q + 1 times We get { q q f(n) q q 1 and } f(n ) { q + 1 q + 1 q q + 1 } It is an easy check that in the four possile cases holds f(n) f(n ) 2 Proof of Theorem 2 Let p k0 p k0 p k0 = p k0 p k0 (p k0 t) e the dividend and p k0+1t the quotient where t is the tail of m 1 zeros We have X m (k 0 ) = M inary By Proposition 15 X m (k 0 + 1) = n X { n n+2m m(k 0) n+2 2m } Every n M inary generates a triad Conversely the numer a (respectively or c) of a triad (a c) is generated y three consecutive list numers as suggested in Tale 2 We define T := {n M inary the last inary digit of n is in t} and T := {q M inary the last inary digit of q is in t} for the corresponding quotient Every q T is generated y three consecutive list numers Since at least one of three
12 INTEGERS: 12 (2012) 12 n2 a c n1 a a c c n a c or a c or a c n+1 c a a c n+2 c a Tale 2: Three consecutive list numers (m odd) consecutive list numers say z must have its last inary digit equal to 1 the numer q is generated y z T so that we do not need T anymore Proof of Theorem 1 Let 2 i = q i k + r i where 0 < r i < k and i N Hence q i r i (mod 2) Note that r i = 2 i mod k We prove y induction the following statement: r i x i (mod 2) and q i = x 1 x 2 x i (written as a inary integer) The statement holds for i = 1 Recall that k 1 We have 2 = q 1 k +r 1 where 0 < r 1 < k So r 1 = 2 Further x 1 = 0 since 1/ k < 1/2 Hence r 1 x 1 (mod 2) and q 1 = x 1 since q 1 = 0 Assume the statement holds for some i Let 2 i+1 = q i+1 k + r i+1 where 0 < r i+1 < k So 2 i+1 = 2q i k + 2r i If 2r i < k then r i+1 = 2r i so r i+1 0 (mod 2) Further q i+1 = 2q i = x 1 x i 0 where x i+1 = 0 If 2r i > k then r i+1 = 2r i k so r i+1 1 (mod 2) Further q i+1 = 2q i + 1 = x 1 x i 1 where x i+1 = 1 In oth cases r i+1 x i+1 (mod 2) and q i+1 = x 1 x i+1 2 Write the remainders 2 i mod k as a sequence R of increasing natural numers: R := ( s 2 + s k 2 k 1) 1 s: s even s odd 1 In the second line are written the 1 s corresponding to the odd remainders y property 1 If r = 1+s is odd then i is odd too since 2 i 1+s (mod k ) implies 2 i 1 (mod ) If r = 2 + s is odd then i is even since 2 i 2 + s (mod k ) implies 2 i 2 (mod ) Therefore the odd remainders (1 5 7 k 2) have the alternating positions (even odd even odd even) The last remainder in this sequence corresponds to an even position i since there are l k /2 = k 1 odd remainders and k 1 /2 pairs (even odd) Hence n 0 n 1 = 1 There are l k /2 = k 1 odd remainders each of them producing a 1 The remaining k 1 remainders produce a 0 4 We have 2 l k 1 (mod k ) So 2 l k/2 1 (mod k ) since l k is even Thus 2 l k/2+1 1 (mod k ) Hence
13 INTEGERS: 12 (2012) (mod k ) and 2 l k /2+1 1 (mod k ); (mod k ) and 2 l k /2+2 1 (mod k ); 2 l k /2 1 (mod k ) and 2 l k 1 (mod k ) Then 2 i + 2 l k/2+i 0 (mod k ) for all i (1 2 l k /2) It follows r i + r lk /2+i = k As k is odd one of the two remainders is odd and the other one is even By property 1 x i + x lk /2+i = 1 5 The word w := (0) l k/2 (1) l k/2 has the properties 2 and 4 of Theorem We start with w and try to construct p k moving digits from one side to the other without violating the properties 2 and 4 The positions i in the left half and the corresponding positions l k /2 + i in the right half of w have different parity We cannot exchange some 1 with any 0 ecause the property 4 remains valid if and only if 1 and 0 are placed at corresponding positions l k /2+i and i When we exchange a 1 with the corresponding 0 at the left side either n 0 or n 1 is decreasing 1 initially we had n 0 n 1 = 1 so either n 0 1 (n 1 + 1) = 1 or n (n 1 1) = y property Therefore we have to exchange the digits y pairs so that the numer of 1 s in the left half must e even When we move a pair of 1 s oth having an even position n 0 n 1 will e altered: n 0 increases 2 and n 1 decreases 2 so n 0 n 1 = 5 If oth have initially an odd position n 0 decreases 2 and n 1 increases 2 so n 0 n 1 = When we move two 1 s to the left side their starting positions must have different parity so that n 0 n 1 = 1 is preserved 6 By property 1 max{i 2 i < k } = k ln()/ln(2) 4 The 2Adic Expansion Lemma 19 Let p k = x 1 x 2 x lk e the period of the inary expansion of 1/ k (k N) The 2adic expansion of 1/ k is purely periodic too and its period p k is the reversal of p k : p k = x lk x 2 x 1 Proof The ring Z 2 of 2adic integers has no zero divisors so there is the field of fractions Q 2 of 2adic numers Every noninteger 2adic numer can e written as i= s x i 2 i where s > 0 is some natural numer The inary expansion (2) can e written as 1 k = 1 2 l k 1 2 l k l k i=1 x i 1 2 i We evaluate this expression term y term in the field Q 2 of 2adic numers We get the 2adic integer 1 2 l k 1 = 1 00 }{{ 0 } 1 00 }{{ 0 } 2 adic l k 1 zeros
14 INTEGERS: 12 (2012) 14 since 1 = l k 1 = 11 1 }{{} l k ones 11 1 }{{} l k ones and 1 00 }{{ 0 } l k 1 zeros }{{} = 111 }{{ } Further we get the 2adic noninteger l k 1 1 x i 2 i = x i 2 i = x i 2 i + 0 i=1 2 adic i= l k i= l k where x i := x i for l k i 1 and x i = 0 for i 0 Note that the word x lk x 2 x 1 is the reversal of p k We multiply the last sum y 2 l k to get the 2adic integer p k 00 where p k = x lk x 2 x 1 Finally }{{ 0 } 1 00 }{{ 0 } p k00 = p k p k l k 1 zeros Proof of Corollary 4 By Lemma 19 the word (0) m 1 p k is the reversal of the enlarged period p k (0) m 1 If one of the two words has complexity 2 m then also the other one so that the necessary and sufficient condition of Theorem 1 holds here too The frequency of nonpalindromic words will possily change ut the difference of frequencies will not Proof of Corollary 5 Apply Lemma 19 Proof of Corollary 6 We define the rotate left operator ρ y ρ(x 1 x 2 x x lk ) := x 2 x x lk x 1 Then 1 k 2 adic = p k p k = 1ρ( p k )ρ( p k ) We need the additive inverse +1/ k 2 adic Such a change of sign can e done in Z 2 y exchanging 1 s and 0 s with exception of the first 1 For instance 1/ = and 1/ = So 1 k 2 adic = 1p + k p+ k where p + k denotes ρ( p k) with its 1 s and 0 s exchanged: p + k + ρ( p k) = 11 }{{ 1 } l k ones The rotate left operator ρ preserves the set of words of length m y moving the first word of p k to the end of ρ( p k ); it also preserves the complementarity of left and right halves Hence if p k has complexity 2 m then ρ( p k ) has complexity 2 m too Since all 2 m words of length m are factors of ρ( p k ) p + k contains the same words We can even say where they can e found: we get p + k = ρlk/2 ( p k ) y iterating ρ on p k exactly l k /2 times
15 INTEGERS: 12 (2012) 15 5 The Decimal Expansion The decimal expansion of 1/ k is purely periodic Let l k denote the length of the period u k Then l 1 = 1 and l k = k 2 for k 2 so l k is now odd The words are over the alphaet { } Furthermore 10 i 1 (mod ) for all positive integers i Since the long division in ase 10 is essentially the same algorithm as in ase 2 we have the following Lemma similar to Lemma 9 Lemma 20 Let k N \ {1} and i {1 2 k 2 } The sequence (r i r i r i ) is a permutation of (0 1 2) Since 10 i 1 (mod ) the proof is simpler and leads to only six possiilities (corresponding to the six permutations of (0 1 2)) equivalent to the case i even in ase 2 We define for m N: M decimal := { m 1}; (4) { ( n n + 10 m n m ) } S decimal := n M decimal (5) There is no special case m = 1 in ase 10 The numers of any triad of S decimal are all different even in the case m = 1 Definition 11 is still valid if we sustitute m N \ {1} y m N p k y u k and inary y decimal If m = 1 then (0) m 1 is defined as the empty word Lemma 12 holds when we sustitute p k y u k For any m N the list numer 0 M decimal generates a tree When we choose m = 2 the tree looks like this: (066) (066) (114477) (225588) (066) (114477) (225588) (770) (144881) (255992) (74074) (185185) (296296) (1467) (124579) (25690) The length of the period u k is regular for k 2 (i e l k+1 = l k ) For p prime the length of the period of 1/p k is usually (p 1)p k 1 There are three known exceptions and p = is one of them 4 We have 1/9 = 0111 and u 2 = 1 At level k = 2 only the word 11 really appears in 1/9 Therefore it is convenient to use the sutree generated y 11 ecause 11 generates the first triad ( 7 70) We have 1/27 = so u = 070 for m = 2 In u there are the three words 0 7 and 70 corresponding to the triad ( 7 70) at level k = Further 1/81 = Then u 4 = for m = 2 There are nine words in u 4 corresponding to the triads (1 4 67) ( ) and ( ) at level k = 4 4 Wikipedia electronic: decimal
16 INTEGERS: 12 (2012) 16 Proof of Theorem 7 For any m N define 1 m := m 1 j=0 10j Instead of Proposition 14 and Proposition 15 we have now { 1m 1m + 10 m 1m m } X m () = and (6) X m (k + 1) = n X m(k) { n n + 10 m n m } (k ) (7) It follows that the list numers of X m (k) (k ) have the form { 1m + t 10 m } X m (k) = t {0 1 2 k 2 k 2 1} We apply Proposition 2 paragraphs 1 and 2: X m (k) = M decimal if and only if 0 < 10 m / k 2 < 1 This condition yields k 0 = m ln(10)/ln() +2 Additionally m (k 2)ln()/ln(10) The numer of leading zeros in 1/ k is z = k ln()/ln(10) so that m 1 < z Finally f(n) f(n ) 1 follows directly from Proposition 2 paragraph The proof of Corollary 8 is almost identical to that of Theorem 2 Instead of Since at least one of three consecutive list numers say z must have its last inary digit equal to 1 in the last part of the proof of Theorem 2 we have now Since at least two of three consecutive list numers say z must have its last digit different from 0 Oviously instead of M inary Proposition 14 and Proposition 15 we have now M decimal expression (6) and expression (7) 6 A Helpful Sequence Lemma 21 Let a/ Q e a positive fraction in lowest terms: a N N \ {1} and gcd(a ) = 1 Let ( t a ) 1 t=0 e a finite sequence of nonnegative integers where t B := {0 1 1} Then the following hold: If 0 < a < 1 then (t + 1) a t a 1 for all t t + 1 B; If 1 < a then there is some t B such that (t + 1) a t a 2 Proof Note that 2 1 Let 0 < a/ < 1 By the inequality x + y x + y + 1 for x y R we have t a + a t a + 1 for all t t + 1 B 2 Let 2 < a/ Then t 0 = 0 is the claimed t ecause a/ 0 2 Let 1 < a/ < 2 Then 1 a < 1 since a 1 We write a = 1 + a So t a = t + t a (8)
17 INTEGERS: 12 (2012) 17 There is a unique t 0 B such that t 0 (a ) + 1 = s is an integer ecause ta (mod ) has the solution t 0 1 a (mod ) We prove that t 0 B is the claimed t We have t0 (a ) + 1 = t 0(a ) + 1 = s; hence t0 (a ) = s 1 Furthermore t0 (a ) We apply relation (8): Finally + a t0 (a ) = (t 0 + 1) a = t t 0 a a 1 = s + a t 0 + a a = t 0 + t 0 (t 0 + 1) a a t 0 = 2 a 1 = s = t s = t 0 + s 1 Lemma 22 Let a/ Q e a positive fraction in lowest terms: a N N \ {1} and gcd(a ) = 1 Let A := {0 1 2 a 1} B := { } and n A Then { ta + n ta + n } { 0 D floor := t B = } Proof As a is relatively prime to the positive integer a generates the additive cyclic group of order in the finite ring Z/Z So {(ta) mod t B} = B For a fix n A ((ta + n) mod ) 1 t=0 permutes the elements of B Then also {(ta + n) mod t B} = B Finally { (ta + n) mod D floor = } t B = { } Proposition 2 Let a/ Q e a positive fraction in lowest terms: a N N \ {1} and gcd(a ) = 1 Let A := {0 1 2 a 1} B := { } and n A Then the following hold: 1 { t a } t B = A 0 < a < 1
18 INTEGERS: 12 (2012) 18 2 { ta + n } t B = A { t a } t B = A Let 0 < a < 1 and r := mod a In the sequence ( ta + n ) 1 S n := t=0 each element of A occurs either /a or /a times There are exactly r elements of A occurring /a times in S n ; each of the remaining a r elements occurs /a times Proof 1 By Lemma 21 2 We define ( ta + n ) 1 S n := t=0 By Lemma 22 the sequence S n contains exactly one integer We calculate the corresponding t solving ta + n 0 (mod ) So t 1 an (mod ) This linear function yields a unique t B for each n A and different t s for different n s We denote this special t y t n By Lemma 22 the sequence S n contains exactly one term (ta + n)/ such that (ta + n)/ + 1/ is integer We calculate the corresponding t solving ta + n (mod ) So t 1 a n 1 a (mod ) We denote this special t B y t n Note that t n t n 1 a (mod ) We get S n+1 (n a 1) y adding 1/ to all terms of S n so that an integer is generated in S n+1 at the position t n of S n and nowhere else y Lemma 22 Hence t n+1 = t n (n a 1) It follows that the sequences S n and S n+1 have the same terms excepted at the position t n+1 = t n: tn+1 a + n + 1 = t n+1a + n + 1 = t na + n + 1 t = n a + n + 1 Let { ta/ t B} = A Note that t 0 = 0 and t 0 t 0 Further t n 0 for all n A \ {0} ecause 1 a n 1 a 0 (mod ) yields n = 1 ut 1 A The sequence S 0 has two or more leading zeros When going up from n to n + 1 no integer gets lost Indeed let u n := (t n 1)a + n and v n := t na + n e two consecutive terms in S n Then v n + 1/ := s + 1 is an integer the only one in S n+1 The integer v n = s does not get lost in S n+1 since u n = s: (t n 1)a + n t = n a + n a = s a = s Conversely if { (ta+n)/ t B} = A for some n A then there is at least one integer s S n occurring twice (or more times): u n = v n = s at the positions
19 INTEGERS: 12 (2012) 19 t n 1 and t n Since t n = t n 1 we can go down from n to n 1 without loosing any of the integers of S n If n = a 1 then t a /a (mod ) It follows t a 1 1 (mod ) so the integers at the positions 2 and 1 in S a 1 are always equal There is a q N such that = qa + r and 0 < r < a Clearly q = /a For an interval I = [i i + 1) i A we have 1 = q a + r and 0 < r < a Let D floor e as in Lemma 22 Then {0/ 1/ 2/ (r 1)/} D floor Note that the interval I is closed at the left and open at the right For every r {0/ 1/ 2/ (r 1)/} the corresponding interval I corresponding to a t such that r = (ta + n)/ (ta + n)/ contains /a times the closed interval of length a/ and for any other r D floor only ( /a 1) times Note that q intervals have q + 1 endpoints Consequently there are r different integers in A each of them occurring exactly ( /a + 1) times in S n ; each of the remaining a r integers occurs exactly /a times References [1] D J Bernstein A noniterative 2adic statement of the x+1 conjecture Proc Amer Math Soc 121 (1994) Availale at [2] D J Bernstein and J C Lagarias The x + 1 conjugacy map Canadian Journal of Mathematics 48 (1996) Availale at lagarias [] J C Lagarias The x + 1 prolem and its generalizations Amer Math Monthly 92 (1985) 2 Availale at lagarias [4] J C Lagarias x + 1 prolem and related prolems Availale at lagarias [5] Josefina Lopez and Peter Stoll The x+1 conjugacy map over a Sturmian word Integers 9 (2009) A Availale at [6] M Lothaire Algeraic Cominatorics on Words volume 90 of Encyclopedia of Mathematics and its Applications Camridge University Press Camridge (2002)
THE padic EXPANSION OF RATIONAL NUMBERS =
THE padic EXPANSION OF RATIONAL NUMBERS KEITH CONRAD 1. Introduction In the positive real numbers, the decimal expansion of every positive rational number is eventually periodic 1 (e.g., 1/55.381.381...)
More informationCHAPTER 5: MODULAR ARITHMETIC
CHAPTER 5: MODULAR ARITHMETIC LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we will consider congruence modulo m, and explore the associated arithmetic called
More informationTheorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.
Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,
More informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More information1 Die hard, once and for all
ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.
More information8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
More informationCongruences. Robert Friedman
Congruences Robert Friedman Definition of congruence mod n Congruences are a very handy way to work with the information of divisibility and remainders, and their use permeates number theory. Definition
More informationReading 7 : Program Correctness
CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 7 : Program Correctness 7.1 Program Correctness Showing that a program is correct means that
More informationTopics in Number Theory
Chapter 8 Topics in Number Theory 8.1 The Greatest Common Divisor Preview Activity 1 (The Greatest Common Divisor) 1. Explain what it means to say that a nonzero integer m divides an integer n. Recall
More informationMATH 289 PROBLEM SET 1: INDUCTION. 1. The induction Principle The following property of the natural numbers is intuitively clear:
MATH 89 PROBLEM SET : INDUCTION The induction Principle The following property of the natural numbers is intuitively clear: Axiom Every nonempty subset of the set of nonnegative integers Z 0 = {0,,, 3,
More informationA farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after.
Fibonacci Problem: A farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after. Question: How many rabbits will the farmer have after n months? Try it on small numbers.
More informationHomework 5 Solutions
Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which
More informationCHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
More informationElementary Number Theory We begin with a bit of elementary number theory, which is concerned
CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,
More informationCOMPOSITES THAT REMAIN COMPOSITE AFTER CHANGING A DIGIT
COMPOSITES THAT REMAIN COMPOSITE AFTER CHANGING A DIGIT Michael Filaseta Mathematics Department University of South Carolina Columbia, SC 22080001 Mark Kozek Department of Mathematics Whittier College
More informationThe Dozenal Society of America
Introduction A standard assignment in elementary mathematics consists of having the student master addition and multiplication tales where the computations are performed in the system of numeration. In
More informationEULER S THEOREM. 1. Introduction Fermat s little theorem is an important property of integers to a prime modulus. a p 1 1 mod p.
EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If
More information3 Congruence arithmetic
3 Congruence arithmetic 3.1 Congruence mod n As we said before, one of the most basic tasks in number theory is to factor a number a. How do we do this? We start with smaller numbers and see if they divide
More informationCourse notes on Number Theory
Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that
More informationPROBLEM SET # 2 SOLUTIONS
PROBLEM SET # 2 SOLUTIONS CHAPTER 2: GROUPS AND ARITHMETIC 2. Groups.. Let G be a group and e and e two identity elements. Show that e = e. (Hint: Consider e e and calculate it two ways.) Solution. Since
More informationA Binary Recursive Gcd Algorithm
A Binary Recursive Gcd Algorithm Damien Stehlé and Paul Zimmermann LORIA/INRIA Lorraine, 615 rue du jardin otanique, BP 101, F5460 VillerslèsNancy, France, {stehle,zimmerma}@loria.fr Astract. The inary
More informationMODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.
MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on
More informationSUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by
SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples
More informationHOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!
Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following
More informationSolutions to Assignment 4
Solutions to Assignment 4 Math 412, Winter 2003 3.1.18 Define a new addition and multiplication on Z y a a + 1 and a a + a, where the operations on the righthand side off the equal signs are ordinary
More informationELEMENTARY NUMBER THEORY AND METHODS OF PROOF
CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF SECTION 4.4 Direct Proof and Counterexample IV: Division into Cases and the QuotientRemainder Theorem Copyright Cengage Learning. All rights reserved.
More informationContinued fractions and good approximations.
Continued fractions and good approximations We will study how to find good approximations for important real life constants A good approximation must be both accurate and easy to use For instance, our
More informationMath Workshop October 2010 Fractions and Repeating Decimals
Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,
More informationDefinition: Group A group is a set G together with a binary operation on G, satisfying the following axioms: a (b c) = (a b) c.
Algebraic Structures Abstract algebra is the study of algebraic structures. Such a structure consists of a set together with one or more binary operations, which are required to satisfy certain axioms.
More informationChapter 6. Number Theory. 6.1 The Division Algorithm
Chapter 6 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,
More informationFractions and Decimals
Fractions and Decimals Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles December 1, 2005 1 Introduction If you divide 1 by 81, you will find that 1/81 =.012345679012345679... The first
More informationFinite Sets. Theorem 5.1. Two nonempty finite sets have the same cardinality if and only if they are equivalent.
MATH 337 Cardinality Dr. Neal, WKU We now shall prove that the rational numbers are a countable set while R is uncountable. This result shows that there are two different magnitudes of infinity. But we
More informationChapter 3: Elementary Number Theory and Methods of Proof. January 31, 2010
Chapter 3: Elementary Number Theory and Methods of Proof January 31, 2010 3.4  Direct Proof and Counterexample IV: Division into Cases and the QuotientRemainder Theorem QuotientRemainder Theorem Given
More informationCONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12
CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.
More informationp 2 1 (mod 6) Adding 2 to both sides gives p (mod 6)
.9. Problems P10 Try small prime numbers first. p p + 6 3 11 5 7 7 51 11 13 Among the primes in this table, only the prime 3 has the property that (p + ) is also a prime. We try to prove that no other
More informationON THE FIBONACCI NUMBERS
ON THE FIBONACCI NUMBERS Prepared by Kei Nakamura The Fibonacci numbers are terms of the sequence defined in a quite simple recursive fashion. However, despite its simplicity, they have some curious properties
More informationMODULAR ARITHMETIC KEITH CONRAD
MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic
More informationA Curious Case of a Continued Fraction
A Curious Case of a Continued Fraction Abigail Faron Advisor: Dr. David Garth May 30, 204 Introduction The primary purpose of this paper is to combine the studies of continued fractions, the Fibonacci
More informationMathematics of Cryptography
CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter
More informationCHAPTER 3 Numbers and Numeral Systems
CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,
More information3. QUADRATIC CONGRUENCES
3. QUADRATIC CONGRUENCES 3.1. Quadratics Over a Finite Field We re all familiar with the quadratic equation in the context of real or complex numbers. The formula for the solutions to ax + bx + c = 0 (where
More informationELEMENTARY NUMBER THEORY AND METHODS OF PROOF
CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.4 Direct Proof and Counterexample IV: Division into Cases and the QuotientRemainder Theorem
More informationCONTINUED FRACTIONS AND FACTORING. Niels Lauritzen
CONTINUED FRACTIONS AND FACTORING Niels Lauritzen ii NIELS LAURITZEN DEPARTMENT OF MATHEMATICAL SCIENCES UNIVERSITY OF AARHUS, DENMARK EMAIL: niels@imf.au.dk URL: http://home.imf.au.dk/niels/ Contents
More informationLecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
More informationFurther linear algebra. Chapter I. Integers.
Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides
More informationOur Primitive Roots. Chris Lyons
Our Primitive Roots Chris Lyons Abstract When n is not divisible by 2 or 5, the decimal expansion of the number /n is an infinite repetition of some finite sequence of r digits. For instance, when n =
More informationINTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS
INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28
More informationContinued Fractions. Darren C. Collins
Continued Fractions Darren C Collins Abstract In this paper, we discuss continued fractions First, we discuss the definition and notation Second, we discuss the development of the subject throughout history
More informationElementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
More informationDiscrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University
Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called
More informationMathematical Induction
Mathematical Induction MAT30 Discrete Mathematics Fall 016 MAT30 (Discrete Math) Mathematical Induction Fall 016 1 / 19 Outline 1 Mathematical Induction Strong Mathematical Induction MAT30 (Discrete Math)
More informationMath Review. for the Quantitative Reasoning Measure of the GRE revised General Test
Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important
More informationMathematical Induction
Chapter 2 Mathematical Induction 2.1 First Examples Suppose we want to find a simple formula for the sum of the first n odd numbers: 1 + 3 + 5 +... + (2n 1) = n (2k 1). How might we proceed? The most natural
More informationCounting Primes whose Sum of Digits is Prime
2 3 47 6 23 Journal of Integer Sequences, Vol. 5 (202), Article 2.2.2 Counting Primes whose Sum of Digits is Prime Glyn Harman Department of Mathematics Royal Holloway, University of London Egham Surrey
More informationAPPLICATIONS OF THE ORDER FUNCTION
APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and
More informationBrendan Nichols June 17, 2008
The Fibonacci numbers first appeared in the 6 th century AD with the Indian mathematician Virahanka s analysis of metres with long and short syllables. In the West, the sequence was first studied by Leonardo
More information1 Algebra  Partial Fractions
1 Algebra  Partial Fractions Definition 1.1 A polynomial P (x) in x is a function that may be written in the form P (x) a n x n + a n 1 x n 1 +... + a 1 x + a 0. a n 0 and n is the degree of the polynomial,
More informationPYTHAGOREAN TRIPLES M. SUNIL R. KOSWATTA HARPER COLLEGE, ILLINOIS
PYTHAGOREAN TRIPLES M. SUNIL R. KOSWATTA HARPER COLLEGE, ILLINOIS Astract. This talk is ased on a three week summer workshop (Los Angeles 2004) conducted y Professor HungHsi Wu, University of California,
More informationCS103X: Discrete Structures Homework Assignment 2: Solutions
CS103X: Discrete Structures Homework Assignment 2: Solutions Due February 1, 2008 Exercise 1 (10 Points). Prove or give a counterexample for the following: Use the Fundamental Theorem of Arithmetic to
More informationPYTHAGOREAN TRIPLES KEITH CONRAD
PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient
More informationMath 139 Problem Set #6 Solution 15 April 2003
Math 139 Problem Set #6 Solution 15 April 2003 A1 (Based on Barr, 41, exercise 3) (a) Let n be an integer greater than 2 Consider the list of numbers n! + 2, n! + 3, n! + 4,, n! + n Explain why all the
More informationQuotient Rings and Field Extensions
Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.
More informationIt is time to prove some theorems. There are various strategies for doing
CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it
More informationChapter Three. Functions. In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics.
Chapter Three Functions 3.1 INTRODUCTION In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics. Definition 3.1: Given sets X and Y, a function from X to
More information= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that
Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without
More informationMTH 382 Number Theory Spring 2003 Practice Problems for the Final
MTH 382 Number Theory Spring 2003 Practice Problems for the Final (1) Find the quotient and remainder in the Division Algorithm, (a) with divisor 16 and dividend 95, (b) with divisor 16 and dividend 95,
More informationElementary Number Theory
Elementary Number Theory Ahto Buldas December 3, 2016 Ahto Buldas Elementary Number Theory December 3, 2016 1 / 1 Division For any m > 0, we define Z m = {0, 1,... m 1} For any n, m Z (m > 0), there are
More informationDecimal Expansion of Rational Numbers
Decimal Expansion of Rational Numbers Helmer Aslaksen Dept. of Teacher Education & Dept. of Mathematics University of Oslo helmer.aslaksen@gmail.com www.math.nus.edu.sg/aslaksen/ Why is 0.999... = 1? We
More information2. Integers and Algorithms Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers
2. INTEGERS AND ALGORITHMS 155 2. Integers and Algorithms 2.1. Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers with a b > 0. (1) Apply the division algorithm: a = bq + r, 0 r < b.
More informationMATH 321 EQUIVALENCE RELATIONS, WELLDEFINEDNESS, MODULAR ARITHMETIC, AND THE RATIONAL NUMBERS
MATH 321 EQUIVALENCE RELATIONS, WELLDEFINEDNESS, MODULAR ARITHMETIC, AND THE RATIONAL NUMBERS ALLAN YASHINSKI Abstract. We explore the notion of welldefinedness when defining functions whose domain is
More informationCONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS
CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS JEREMY BOOHER Continued fractions usually get shortchanged at PROMYS, but they are interesting in their own right and useful in other areas
More information8 Divisibility and prime numbers
8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express
More informationBreaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and
Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study
More informationMath 319 Problem Set #3 Solution 21 February 2002
Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod
More information(x + a) n = x n + a Z n [x]. Proof. If n is prime then the map
22. A quick primality test Prime numbers are one of the most basic objects in mathematics and one of the most basic questions is to decide which numbers are prime (a clearly related problem is to find
More informationLecture 1: Elementary Number Theory
Lecture 1: Elementary Number Theory The integers are the simplest and most fundamental objects in discrete mathematics. All calculations by computers are based on the arithmetical operations with integers
More informationOh Yeah? Well, Prove It.
Oh Yeah? Well, Prove It. MT 43A  Abstract Algebra Fall 009 A large part of mathematics consists of building up a theoretical framework that allows us to solve problems. This theoretical framework is built
More informationI. GROUPS: BASIC DEFINITIONS AND EXAMPLES
I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called
More information8.7 Mathematical Induction
8.7. MATHEMATICAL INDUCTION 8135 8.7 Mathematical Induction Objective Prove a statement by mathematical induction Many mathematical facts are established by first observing a pattern, then making a conjecture
More informationPrime Numbers. Chapter Primes and Composites
Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are
More informationMathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR
Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGrawHill The McGrawHill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,
More informationThe finite field with 2 elements The simplest finite field is
The finite field with 2 elements The simplest finite field is GF (2) = F 2 = {0, 1} = Z/2 It has addition and multiplication + and defined to be 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 0 0 = 0 0 1 = 0
More informationSolutions to Practice Problems
Solutions to Practice Problems March 205. Given n = pq and φ(n = (p (q, we find p and q as the roots of the quadratic equation (x p(x q = x 2 (n φ(n + x + n = 0. The roots are p, q = 2[ n φ(n+ ± (n φ(n+2
More informationThis section demonstrates some different techniques of proving some general statements.
Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you
More informationInduction and Recursion
Induction and Recursion Winter 2010 Mathematical Induction Mathematical Induction Principle (of Mathematical Induction) Suppose you want to prove that a statement about an integer n is true for every positive
More informationCS 103X: Discrete Structures Homework Assignment 3 Solutions
CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On wellordering and induction: (a) Prove the induction principle from the wellordering principle. (b) Prove the wellordering
More informationMATH 2030: SYSTEMS OF LINEAR EQUATIONS. ax + by + cz = d. )z = e. while these equations are not linear: xy z = 2, x x = 0,
MATH 23: SYSTEMS OF LINEAR EQUATIONS Systems of Linear Equations In the plane R 2 the general form of the equation of a line is ax + by = c and that the general equation of a plane in R 3 will be we call
More information3.1 The Definition and Some Basic Properties. We identify the natural class of integral domains in which unique factorization of ideals is possible.
Chapter 3 Dedekind Domains 3.1 The Definition and Some Basic Properties We identify the natural class of integral domains in which unique factorization of ideals is possible. 3.1.1 Definition A Dedekind
More informationU.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra
U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory
More information4. Number Theory (Part 2)
4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.
More informationNIM Games: Handout 1
NIM Games: Handout 1 Based on notes by William Gasarch 1 OnePile NIM Games Consider the following twoperson game in which players alternate making moves. There are initially n stones on the board. During
More informationIntegers: applications, base conversions.
CS 441 Discrete Mathematics for CS Lecture 14 Integers: applications, base conversions. Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Modular arithmetic in CS Modular arithmetic and congruencies
More information11 Ideals. 11.1 Revisiting Z
11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(
More informationAn important class of codes are linear codes in the vector space Fq n, where F q is a finite field of order q.
Chapter 3 Linear Codes An important class of codes are linear codes in the vector space Fq n, where F q is a finite field of order q. Definition 3.1 (Linear code). A linear code C is a code in Fq n for
More informationMIDY S THEOREM FOR PERIODIC DECIMALS. Joseph Lewittes Department of Mathematics and Computer Science, Lehman College (CUNY), Bronx, New York 10468
INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 7 (2007), #A02 MIDY S THEOREM FOR PERIODIC DECIMALS Joseph Lewittes Department of Mathematics and Computer Science, Lehman College (CUNY), Bronx,
More informationInduction. Mathematical Induction. Induction. Induction. Induction. Induction. 29 Sept 2015
Mathematical If we have a propositional function P(n), and we want to prove that P(n) is true for any natural number n, we do the following: Show that P(0) is true. (basis step) We could also start at
More informationMA2C03 Mathematics School of Mathematics, Trinity College Hilary Term 2016 Lecture 59 (April 1, 2016) David R. Wilkins
MA2C03 Mathematics School of Mathematics, Trinity College Hilary Term 2016 Lecture 59 (April 1, 2016) David R. Wilkins The RSA encryption scheme works as follows. In order to establish the necessary public
More informationDETERMINANTS. b 2. x 2
DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in
More information15 Markov Chains: Limiting Probabilities
MARKOV CHAINS: LIMITING PROBABILITIES 67 Markov Chains: Limiting Probabilities Example Assume that the transition matrix is given by 7 2 P = 6 Recall that the nstep transition probabilities are given
More informationIf f is a 11 correspondence between A and B then it has an inverse, and f 1 isa 11 correspondence between B and A.
Chapter 5 Cardinality of sets 51 11 Correspondences A 11 correspondence between sets A and B is another name for a function f : A B that is 11 and onto If f is a 11 correspondence between A and B,
More information