Collatz Conjecture Demonstration of the Relationship Between The
Total Page:16
File Type:pdf, Size:1020Kb
Collatz conjecture Demonstration of the relationship between the numbers of even and odd steps before reaching 1, and the initial odd value of a Collatz sequence that converges Farid Baleh To cite this version: Farid Baleh. Collatz conjecture Demonstration of the relationship between the numbers of even and odd steps before reaching 1, and the initial odd value of a Collatz sequence that converges. In press. hal-02935616 HAL Id: hal-02935616 https://hal.archives-ouvertes.fr/hal-02935616 Preprint submitted on 24 Sep 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Collatz conjecture Demonstration of the relationship between the numbers of even and odd steps before reaching 1, and the initial odd value of a Collatz sequence that converges Farid Baleh - [email protected] 2020/09/11 Summary The relationship between the numbers of even steps (P), the number of odd steps (I) and the odd initial value 푢0 of a compressed Collatz sequence that converges is as follows: 푰 푰 + 푷 = 푬(퐥퐨퐠ퟐ(ퟑ ∗ 풖ퟎ)) + ퟏ This relation is equivalent to the expression below: 푰 + 푷 = 푬(푰 ∗ 퐥퐨퐠ퟐ(ퟑ)) + 푬(퐥퐨퐠ퟐ(풖ퟎ)) + ퟏ { 풐풓 푰 + 푷 = 푬(푰 ∗ 퐥퐨퐠ퟐ(ퟑ)) + 푬(퐥퐨퐠ퟐ(풖ퟎ)) + ퟐ Where: - 퐸(푥) is the integer part of the real number x; - log2(푥) is the base two logarithm of the real number x; - 퐸(log2(푢0)) is the exponent of the biggest power of 2 that is strictly less than the odd natural number 푢0; - I+P is the total stopping time of the compressed sequence. 1- Introduction The Collatz conjecture (or Syracuse conjecture, Ulam conjecture or 3x+1 problem) claims that the following sequence of natural numbers reaches the value 1 after a certain rank (or that the sequence of its odd numbers tends to 1). For a natural number 푠0 ≥ 1 and for all natural number n: 푠푛 , 푖푓 sn is even 푠푛 = { 2 3푠푛 + 1, 푖푓 sn is odd 3p+1 being even if the natural number p is odd, the compressed sequence (푐푛) of the sequence (푠푛) is defined as follows: For a natural number 푐0 ≥ 1 and for all natural number n: 푐 푛 , 푖푓 c is even 2 n 푐푛 = {3푐 +1 푛 , 푖푓 c is odd 2 n An uncompressed (or compressed) sequence that converges continues, after a certain rank, with the trivial cycle 1-4-2 (or 1-2) that is infinitely repeated. 2- General expression of an odd element of a compressed Collatz sequence Considering the extracted sequence (푢푛) composed of the odd elements of the sequence (푠푛), two successive elements have the following relationship: 3푢푛−1 + 1 푢푛 = 2푘′푛 Where 푘′푛 is the number of divisions by 2 that occur between 푢푛−1 and 푢푛. By developing the previous expression: 3푛푢 3푛−1 3푛−2 30 푢 = 0 + + + ⋯ + 푛 ∑푛 ∑푛 ∑푛 푘′ 2 푗=1 푘′푗 2 푗=1 푘′푗 2 푗=2 푘′푗 2 푛 Then: 푛 푛 푛−푖 3 푢0 3 푢푛 = 푛 + ∑ 푛 ∑푗=1 푘′푗 ∑푗=푖 푘′푗 2 푖=1 2 Page 2 / 7 After factorization of the 푢0 multiplier and simplification of the second term: 푛 푛 3 푖−1 −푖 ∑푗=1 푘′푗 푢푛 = 푛 [푢0 + ∑ (3 ∗ 2 ) ] ∑푗=1 푘′푗 2 푖=1 Moreover, for all j: 푘′푗 = 1 + 푘푗, because the successor of an odd element of (푠푛) is always even; 푘푗 is then the number of divisions by 2 between two successive odd elements of sequence (푐푛). 푛 푛 푖−1 푖−1 Therefore: ∑푗=1 푘′푗 = 푛 + ∑푗=1 푘푗 and ∑푗=1 푘′푗 = (푖 − 1) + ∑푗=1 푘푗 Notice also that: 3푢푛−1 + 1 푢푛 = 21+푘푛 푛 ∑푗=1 푘푗 is the number of the even elements, at the rank j, of the compressed sequence (푐푛) that follow 푢0. By introducing 푘푗 and after a new factorization, the expression of 푢푛 becomes: 푛 푛 푖−1 3 1 1 2 푖−1 ∑푗=1 푘푗 푢푛 = ( ) ∗ 푛 [푢0 + ∑ (( ) ∗ 2 ) ] 2 ∑푗=1 푘푗 3 3 2 푖=1 After a shift on the index 푖, the expression of 푢푛, depending on an initial value 푢0, of n and of the first n elements of the sequence (푘푛), we have that: 푛 푛−1 푖 3 1 1 2 푖 ∑푗=1 푘푗 푢푛 = ( ) ∗ 푛 [푢0 + ∑ (( ) ∗ 2 ) ] 2 ∑푗=1 푘푗 3 3 2 푖=0 And hence: ퟏ 풙풏 ∀풏 ≥ ퟎ, 풖풏 = (풖ퟎ + ) (1) 풂풏 ퟑ With: 풊 풊 풏−ퟏ ퟐ ∑ 풌풋 풙 = ∑ (( ) ∗ ퟐ 풋=ퟏ ) (2) 풏 풊=ퟎ ퟑ 풏 풏 ퟐ ∑ 풌풋 풂 = ( ) ∗ ퟐ 풋=ퟏ (3) 풏 ퟑ ∀푛 ≥ 1, 푥푛 and 푎푛 are strictly positive. Therefore (푘푛) is strictly increasing. Moreover: 풏−ퟏ 푎푛 = 푥푛+1 − 푥푛 and 풙풏 = ∑풊=ퟎ 풂풊 푎푛 is the general term of serie (푥푛). Page 3 / 7 We also can write that, for all natural number n: 풏 ퟐ 푷(풏) 풂 = ( ) ∗ ퟐ (4) 풏 ퟑ And: 풏−ퟏ ퟐ 풊 풙 = ∑ ( ) ∗ ퟐ푷(풊) 풏 ퟑ 풊=ퟎ 풊 With: ∀푖 ∈ [1, 푛], 푷(풊) = ∑풋=ퟏ 풌풋 P(i) is the number of even elements, at rank i, of the compressed sequence (푐푛) that follow 푢0, the corresponding number of odd elements being of course i. Note also that: 푥0 = 0 and 푎0 = 푥1 = 1. 3- Relation between the numbers of even steps, odd steps and 풖ퟎ a. Expression of I+P as a function of I and 풂푰 Considering Collatz sequence (푢푛) composed of the odd elements of the sequence (푠푛), that converges to 1, i.e. lim (푢푛) = 1. 푛→+∞ This sequence being digital, it exists a rank I for which 푢퐼 = 1. 1 푥퐼 Therefore, the formula (1) gives: 푢퐼 = (푢0 + ) = 1; then: 푎퐼 3 풙푰 풂 = 풖 + (5) 푰 ퟎ ퟑ 2 퐼 According to (4): 푎 = ( ) ∗ 2푃(퐼) 퐼 3 We can note P=P(I); I and P are respectively the odd and even steps of the sequence (푐푛) before reaching 1, I+P being then its total stopping time. By applying the base two logarithms of the two terms of the previous equation, we have that: 푥퐼 푥퐼 퐼 + 푃 = log (3퐼 ∗ 푎 ) = log [3퐼 ∗ (푢 + )] = 퐼 ∗ log (3) + log (푢 + ) 2 퐼 2 0 3 2 2 0 3 I+P is an integer that is the sum of the two last terms of this equality, each of them being non integer real numbers. Consequently, by using 퐸(푥) as the integer part of the real number x: 풙푰 푬(푰 + 푷) = 퐈 + 퐏 = 푬(푰 ∗ 퐥퐨퐠 (ퟑ)) + 푬 (퐥퐨퐠 (풖 + )) + ퟏ (6) ퟐ ퟐ ퟎ ퟑ Page 4 / 7 b. Expression of 푬(퐥퐨퐠ퟐ(풂푰)) as a function of 풏ퟎ = 푬(퐥퐨퐠ퟐ(풖ퟎ)) 푛0 We have: 푢0 = 2 + 푟0, 푟0 being a natural number ; 푛0 is the exponent of the biggest power of 2 that is strictly less than the odd natural number 푢0. We can apply the two following inequalities: 푛0 푛0+1 - 2 ≤ 푢0 < 2 ⇒ 푛0 ≤ log2(푢0) < 푛0 + 1 ⇒ 풏ퟎ = 푬(퐥퐨퐠ퟐ(풖ퟎ)) by definition of the integer part function of a real number ; 푛0 - 0 ≤ 푟0 < 2 . Notice that, 푢0 being odd, the two above inequalities are strict. According to (5), 푎퐼 > 푢0 because 푥퐼 > 0 ; therefore: log2(푢0) < log2(푎퐼) ; then 풏ퟎ ≤ 푬(퐥퐨퐠ퟐ(퐚퐈)), the logarithm and integer part functions being increasing. Moreover, it is obvious that, according to (4): 2 퐼+푛 2 퐼+푛 ퟒ 풏 ∀푛 ≥ 0, 푎 = ( ) ∗ 2푃(퐼+푛) = ( ) ∗ 2푃+푛=( ) ∗ 푎 퐼+푛 3 3 ퟑ 퐼 Because 푃(퐼 + 푛) = 푃(퐼) + 푃(푛) = 푃 + 푛, P(n) being incremented by 1 from 푎퐼+푛 to 푎퐼+푛+1. ퟒ Then: ∀풏 ≥ ퟎ, 퐥퐨퐠 (풂 ) = 풏 ∗ 퐥퐨퐠 ( )+퐥퐨퐠 (풂 ) (7) ퟐ 푰+풏 ퟐ ퟑ ퟐ 푰 (푎퐼+푛) is an increasing sequence, with the integer part of the base two logarithm of its first term 푎퐼 being greater or equal to 푛0. 4 We have that: log ( ) ≈ 0,415. 2 3 Consequently, a maximum of 3 consecutive terms of the increasing sequence (퐸(log2(푎퐼+푛))) may be equal. If we consider the first natural number 푛1 for which: 퐸(log2(aI+푛1)) = 푛0 + 1 4 According to (7): log (푎 ) = 푛 ∗ log ( )+log (푎 ) = 푁 +log (푎 ) 2 퐼+푛1 1 2 3 2 퐼 1 2 퐼 4 By noting: 푁 = 푛 ∗ log ( ) . 1 1 2 3 By deduction, we get: 퐸(log2(푎퐼+푛1)) = 퐸(푁1) + E(log2(푎퐼)) { 풐풓 퐸(log2(푎퐼+푛1)) = 퐸(푁1) + E(log2(푎퐼)) + 1 Page 5 / 7 And then: 푛0 + 1 = 퐸(푁1) + E(log2(푎퐼)) { 풐풓 푛0 + 1 = 퐸(푁1) + E(log2(푎퐼)) + 1 By taking account the inequality 푛0 ≤ 퐸(log2(aI)), we obtain the two possible following inequalities: 푛0 + 1 ≥ 퐸(푁1) + 푛0 { 풐풓 푛0 + 1 ≥ 퐸(푁1) + 푛0 + 1 Then: 퐸(푁1) ≤ 1 { 풐풓 퐸(푁1) ≤ 0 ⇒ 퐸(푁1) = 0 The integer part of a positive real number being positive or equal to 0, but not negative, we have: 퐸(푁1) = 0 or 퐸(푁1) = 1. Therefore, the possible values of 푛1 are : 0, 1, 2, 3 or 4 (see table below).