Collatz Cycles and 3n+c Cycles
CCollatz Cycles and 3 n + c Cycles
Darrell CoxGrayson County CollegeDenison, TX 75020USASourangshu GhoshIndian institute of Technology KharagpurKharagpur, West Bengal 721302IndiaEldar SultanowPotsdam University14482 PotsdamGermany
Abstract
The next element in the 3 n + 1 sequence is defined to be (3 n + 1) / n is odd or n/ n is chosen, the sequence always reaches 1(where it goes into the repeating sequence (1,2,1,2,1,2,. . . ). The onlyknown Collatz cycle is (1,2). Let c be an odd integer not divisible by3. Similar cycles exist for the more general 3 n + c sequence. The 3 n + c cycles are commonly grouped according to their length and numberof odd elements. The smallest odd element in one of these cyclesis greater than the smallest odd elements of the other cycles in thegroup. A parity vector corresponding to a cycle consists of 0’s for theeven elements and 1’s for the odd elements. A parity vector generatedby the ceiling function is used to determine this smallest odd element.Similarly, the largest odd element in one of these cycles is less than thelargest odd elements of the other cycles in the group. A parity vectorgenerated by the floor function is used to determine this largest oddelement. This smallest odd element and largest odd element appear to a r X i v : . [ m a t h . G M ] M a r e in the same cycle. This means that the parity vector generated bythe floor function can be rotated to match the parity vector generatedby the ceiling function. Two linear congruences are involved in thisrotation. The natural numbers generated by one of these congruencesappear to be uniformly distributed (after sorting). This sequence hasproperties similar to those of the zeta function zeros. Introduction
Halbeisen and Hungerb¨uhler [1] found new techniques which allow a refinedanalysis of rational (and hence integer) Collatz cycles. In particular, theyprove optimal estimates for the length of a cycle having positive elements interms of its minimum. Their main results are reproduced here since they aredirectly applicable to 3 n + c cycles. Most lemmas are omitted. For x ∈ R let g ( x ) = x/ g ( x ) = (3 x + 1) /
2. Let Q [(2)] denote thelocal ring of fractions of Z at the prime ideal(2), i.e. the domain of all ratio-nal numbers having (written in least terms) an odd denominator. A number p/q ∈ Q [(2)] with odd q is considered even or odd according to the parityof the numerator p . Then the Collatz sequence generated by x ∈ Q [(2)] isdefined by x n = g ( x n − ) if x n − is even or g ( x n − ) if x n − is odd for n ∈ N .Let S l,n denote the set of all 0-1 sequences of length l containing exactly n ones, S l = ∪ ln =0 S l,n and S = ∪ l ∈ N S l . With every s = ( s , . . . , s l ) ∈ S l we associate the affine function φ s : R → R , φ s = g s l ◦ . . . ◦ g s ◦ g s . Asequence ( x , . . . , x l ) of real numbers x i is called a pseudo-cycle of length l ifthere exists s = ( s , . . . , s l ) ∈ S l such that (1) φ s ( x ) = x ∈ Q [(2)] and (2) g s i +1 ( x i ) = x i +1 for i = 0 , . . . , l − p/q ∈ Q with 2 r | q then 2 r | ˜ q where ˜ q denotes the denominatorof g i ( p/q ) ( i = 0 , Q [(2)].Thus, if p/q and g i ( p/q ) = ˜ p/ ˜ q are consecutive elements of a pseudo-cycle,then i = 0 if p is even (since else ˜ p/ ˜ q / ∈ Q [(2)]) or i = 1 if p is odd (since else˜ p/ ˜ q / ∈ Q [(2)]). The conclusion of this observation is given by the followinglemma 1. Lemma 1.
The set of pseudo-cycles coincides with the set of Collatz cyclesin Q [(2)] . Cycles consist of either positive or negative elements. The function ϕ : S → N will be defined recursively by ϕ (Ø) = 0, ϕ ( s ) = ϕ ( s ), and ϕ ( s ) = 3 ϕ ( s ) + 2 l ( s ) where s denotes an arbitrary element of S and l ( s ) the length of s . The function ϕ is computed explicitly by ϕ ( s ) =3 l ( s ) j =1 s j s j +1 + ... + s l ( s ) j − .A consequence of the above definition is the decomposition formula ϕ ( s ¯ s ) =3 n (¯ s ) ϕ ( s ) + 2 l ( s ) ϕ (¯ s ). Here s ¯ s is the concatenation of s , ¯ s ∈ S , and n ( s )denotes the number of 1’s in the sequence s . The next lemma 2 shows how ϕ is used to explicitly compute the function φ s . Lemma 2. (Lagarias [2]). For arbitrary s ∈ S , φ s ( x ) = n ( s ) x + ϕ ( s )2 l ( s ) andhence for every s ∈ S there exists a unique x ∈ Q [(2)] which generates aCollatz cycle in Q [(2)] of length l ( s ) and which coincides with the pseudo-cycle generated by s . The value x is given by x = ϕ ( s )2 l ( s ) − n ( s ) .Proof. The proof is by induction with respect to l ( s ). (1) l ( s ) = 1: This ischecked from the definition. (2) l ( s ) >
1: If s = ¯ s then φ ¯ s ( x ) = φ ¯ s ( x )2 = n (¯ s ) x + ϕ (¯ s )2 · l (¯ s ) = n ( s ) x + ϕ ( s )2 l ( s ) . The case s = ¯ s s ∈ S l let σ ( s ) denote the orbit of s in S l generated by the left-shift per-mutation λ l : ( s , . . . , s l ) → ( s , .., s l , s ), i.e. σ ( s ) := { λ kl ( s ) : k = 1 , . . . , l } .Furthermore, let M l,n denote max s ∈ S l,n { min t ∈ σ ( s ) ϕ ( t ) } .Now suppose the Collatz conjecture is verified for all initial values x ≤ m .If one can then show that ∀ n, l < L : M l,n l − n ≤ m , it follows that the length ofa Collatz cycle in N which does not contain 1 is at least L .Let ˜ s denote the sequence for which ϕ attains the value M l,n . Lemma 3.
Let n ≤ l be natural numbers. Let ˜ s i := (cid:100) in/l (cid:101) − (cid:100) ( i − n/l (cid:101) (for ≤ i ≤ l ). Then ϕ (¯ s ) = min t ∈ σ (¯ s ) { ϕ ( t ) } = M l,n . Corollary 1.
For every l and n ≤ l we have M l,n = (cid:80) lj =1 ( (cid:100) jn/l (cid:101) − (cid:100) ( j − n/l (cid:101) )2 j − n −(cid:100) jn/l (cid:101) . n + c Cycle
Setting c to 2 l ( s ) − n ( s ) in Lemma 2 gives integer 3 n + c cycles. A staircasefor ˜ s where 27 and n = 17 along with a staircase representing the partialsums of (cid:98) in/l (cid:99) − (cid:98) ( i − n/l (cid:99) is given in Figure 1.4igure 1: staircase representing the partial sums of (cid:98) in/l (cid:99) − (cid:98) ( i − n/l (cid:99) The staircase using the floor function can be viewed as being an upside-downstaircase where Halbeisen and Hungerb¨uhler’s logic can be used to find alower bound of the maximum odd element in a 3 n + c cycle. Let t j = (cid:100) jn/l (cid:101)−(cid:100) ( j − n/l (cid:101) , j = 1 , . . . , l . This parity vector is an element of S l,n . Let r denotegcd( l, n ). The parity vector (cid:98) jn/l (cid:99) − (cid:98) ( j − n/l (cid:99) , j = 1 , . . . , l , consists of r identical sub-vectors. Similarly, the parity vector t j consists of r identicalsub-vectors and each of these sub-vectors is the same as the correspondingsub-vector of (cid:98) jn/l (cid:99) − (cid:98) ( j − n/l (cid:99) , j = 1 , . . . , l , except for the first and lastelements. First suppose that l and n are relatively prime. When the parityvector (cid:98) jn/l (cid:99) − (cid:98) ( j − n/l (cid:99) , j = 1 , . . . , l is right-rotated by one position(corresponding to a multiplication by 2), it matches t j except for the firsttwo elements of each sub-vector. The first mismatch corresponds to a loss of3 n − and the second mismatch corresponds to a gain of 2 · n − . In general, theloss is (cid:80) r − i =0 i ( l/r ) n − − i ( n/r ) . Let N l,n denote 2 M l,n − (cid:80) r − i =0 i ( l/r ) n − − i ( n/r ) .A primitive 3 n + c cycle doesn’t have any common divisors of its elements. Ageneralization of Halbeisen and Hungerb¨uhler’s result is given by Corollary 2: Corollary 2. If c = 2 l − n , M l,n is greater than or equal to the minimum lements in the n + c cycles corresponding to s ∈ S l,n (not necessarily prim-itive) and N l,n is less than or equal to the maximum odd elements in thecycles. The elements of the 3 n + c cycles are ϕ ( t ) t ∈ σ ( s ) where s ∈ S l,n . From thedefinition of N l,n , it is not apparent that it is in a cycle, but it appears to bein the same cycle as M l,n .For example, for ( l, n ) = (6 , M l,n is (1 , , , , , c = −
17, and the odd elements of the cycle containing M l,n and N l,n are(85 , , , S l,n and its odd elementsare (65 , , , M l,n (85) is greater than 65 and the largest odd elements in the cycle containing N l,n (119) is less than 125. The cycle with odd elements of (85 , ,
7) for c = − l and n are not relatively prime and c = 2 l − n , the cycles generatedfrom M l,n are not primitive. This is due to the duplicated sub-vectors in theparity vector forming a geometric progression. This geometric progressionis the same as in the expansion of ( a x − b x ) / ( a − b ). Reducing the cyclegenerated from M , effectively divides 2 − by (2 − ) / (2 − ).When l = 11 and n = 7, M l,n = 3767, N l,m = 6805, and 2 l − n = − /
139 (approximately equal to 27) is greater than the min-imum element in the c = − , , , , , , , , , , /
139 (approximately equal to 49) is less than the maximum oddelement. For the c = − , , M , = 5 and N , = 7 ( − − ). For c = −
17, the cycles are (85 , , , , , , , , , , , , , , , − = − M , (equal to 85) and N , (equal to 119). As ex-pected, 85 is greater than 73 and 65 and 119 is less than 143 and 179. Thecycle (85 , , c = − c = 1 cycle of (4 , − = 1 and M , = N , = 1. There can be no othersuch c = 1 cycles due to the Catalan conjecture (proved by Mihˇailescu [3]).This theorem states that the only natural number solutions of x a − y b are x = 3, a = 2, y = 2, and b = 3. This leaves the possibility of 3 n + c cycleswhere s ∈ S l,n that are not primitive and reduce to c = 1 cycles.All the parity vectors in S are used up by the 3 n + c cycles where c = 2 l − n .6wo 3 n + c cycles with different c values can’t have the same parity vector.For example, the elements of a c = 5 cycle are (19 , , , ,
38) and a c = 7sequence having the same parity vector is (65 , , , , , . . . ). Theratios of the odd elements are 0.2923, 0.3069, and 0.3161 and would have tokeep increasing to match the iterations of the 3 n + 5 cycle. So the unreduced3 n + c cycles where c = 2 l − n account for all possible primitive 3 n + c cycles. Let d denote the rotation of the floor parity vector required to match theceiling parity vector (measured in the clockwise direction). This quantityappears to satisfy the congruence n · d ≡ − l when gcd( l, n ) = 1. Asimilar congruence is d ( n − x ) − ( l − d ) x ≡ − l . This congruence wasderived using the staircases and can be solved given the d value so that thevalues of ( n − x, x ) are not specific to properties of 3 n + c cycles.For a real number x , let [ x ] denote the integral part of x and { x } the frac-tional part. The sequence ω = { x n } , n = 1 , , , . . . of real numbers is saidto be uniformly distributed modulo 1 (abbreviated u.d. mod1) if for everypair a, b of real numbers with 0 ≤ a < b ≤ N →∞ A ([ a,b ); N ; ω ) N = b − a . The formal definition of u.d. mod 1 was given by Weyl [4] [5]. Let∆ : 0 = z < z < z < . . . be a subdivision of the interval [0 , ∞ ) withlim k →∞ z k = ∞ . For z k − ≤ x < z k put [ x ] ∆ = z k − and { x } ∆ = x − z k − z k − z k − so that 0 ≤ { x } ∆ <
1. The sequence of ( x n ), n = 1 , , , . . . of non-negativereal numbers is said to be uniformly distributed modulo ∆ (abbreviated u.d.mod ∆) if the sequence ( { x n } ∆ ), n = 1 , , , . . . is u.d. mod 1. The notion ofu.d. mod∆ was introduced by Leveque [6].If f is a function having a Riemann integral in the interval [ a, b ], then its in-tegral is the limit of Riemann sums taken by sampling the function f in a setof points chosen from a fine partition of the interval. This is then a criterionfor determining if a sequence is uniformly distributed. A sequence of realnumbers is uniformly distributed (mod 1) if and only if for every Riemann-integrable function f on [0 ,
1] one has lim N →∞ /N (cid:80) n ≤ N f ( { x n } ) = (cid:82) f ( x ) dx .In the following, evidence that n − x and x are u. d. mod ∆ is presentedusing this criterion and Weyl’s criterion [4] [5].7eyl’s criterion is that ( γ n ) is u.d. mod 1 if and only if lim N →∞ /N (cid:80) Nn =1 e πimγ n =0 for every integer m (cid:54) = 0. In the following, the z increments in the subdivi-sion are set to √ n − x and x values.A plot of the resulting sequence generated from the sorted n − x values for n = 1 , . . . , l − l = 997 is given in Figure 2.Figure 2: sequence generated from the sorted n − x values for n = 1 , . . . , l − l = 997In the following, ( γ n ) is set to such sequences and the moduli of the complex-valued results are computed. The moduli for l = 1999, n − x , and m = 1 aregiven in Figure 3. 8igure 3: Moduli for l = 1999, n − x , and m = 1A cubic least-squares fit of the curve (where R-squared=0.9999) is included.The moduli for l = 1999, x , and m = 1 (excluding 16 values of zero in theinput sequence) are given in Figure 4.9igure 4: Moduli for l = 1999, x , and m = 1The moduli for l = 9973, n − x , and m = 10 are given in Figure 5.10igure 5: Moduli for l = 1999, x , and m = 1The moduli for l = 9973, x , and m = 10 (excluding 18 values of zero in theinput sequence) are given in Figure 6.11igure 6: Moduli for l = 9973, x , and m = 10In general, there are m − f ( x ) to be considered are x , x , x , x , √ x , (cid:112) √ x , log( x ), e x , sin( x ), cos( x ), tan( x ), and a + x . The values of (cid:82) f ( x ) dx are 1 /
2, 1 / /
4, 1 /
5, 2 /
3, 4 / −
1, 2 .
72, 0 .
84, 0 .
54, 1 .
56, and a tan − xa (equal to 0 . a = 2 and 0 .
11 for a = 3) respectively. For l = 997 and the sequencegenerated from x , the results are 0 .
49, 0 .
31, 0 .
22, 0 .
17, 0 .
66, 0 . − . .
69, 0 .
84, 0 .
56, 1 .
45, 0 .
23 (for a = 2), and 0 .
11 (for a = 3) respectively. For l = 9973 and the sequence generated from n − x , the results are 0 .
50, 0 . .
25, 0 .
20, 0 .
67, 0 . − .
97, 2 .
74, 0 .
84, 0 .
54, 1 .
55, 0 .
23 (for a = 2), and 0 . a = 3) respectively.The trigonometric functions require a fixed amount to be added to thesequence values (apparently to change the phase). The exponential func-tion also requires a fixed amount to be added to the sequence values - thesame as for the cosine function. Apparently, this is due to Euler’s formula12 ix = cos( x ) + i · sin( x ). Denote the amounts for sine and cosine by j and k respectively. These values satisfy the equation j + k = cos(1), similar to theformula sin( x ) +cos( x ) = 1. They also satisfy the equation j/k = (cid:112) tan(1),similar to the formula sin( x ) / cos( x ) = tan( x ). The amount required for thesine function is sin − (cos(1)). The amount required for the cosine functioncan be determined by using the formula j + k = cos(1). The amount re-quired for the tangent function is 1 /e ( e = tan(1) /j ).See Cox and Ghosh [7] for more graphs. Cox [8] investigated convolving the zeta function zeros with the M¨obius func-tion. This method is applicable to any uniformly distributed sequence. Inthe following, the n − x values are ordered in increasing value. A plot of n − x convolved with the M¨obius function for l = 1999 (a prime) is given inFigure 7. 13igure 7: Convolution of n − x with the M¨obius functionThe convolution consists of many curves. The bottom curve corresponds tothe 302 primes less than 1999. Let p and q denote distinct primes. A plot ofthe curves at pq locations is given in Figure 8.14igure 8: Curves at pq locationsThe convolution of the differences between the adjacent n − x values withthe M¨obius function for a particular curve is normally distributed. For theabove pq curve, the mean is 0.5879 with a 95% confidence interval of (0.3742,0.8016) and the standard deviation is 2.5812 with a 95% confidence intervalof (2.4387, 2.7415). A plot of this distribution along with the correspondingprobit function is given in Figure 9. 15igure 9: Convolution of differences with M¨obius functionThe probit function is the inverse cumulative distribution function of thestandard normal distribution. The more general function F − ( p ) = µ + σ Φ − ( p ) where µ and σ are the mean and standard deviation of the normaldistribution is used here. The poor fit is partially due to the discrete valuesof the distribution.A plot of the zeta function zeros convolved with the M¨obius function for l = 1 , , , . . . , pq locations is given in Figure 11.17igure 11: Curves at pq locationsThe convolution of the differences between the adjacent zeta function zerosvalues with the M¨obius function for a particular curve is normally distributed.For the above pq curve, the mean is 2.7126 with a 95% confidence intervalof (2.6015, 2.8237) and the standard deviation is 1.3419 with a 95% confi-dence interval of (1.2678, 1.4252). A plot of this distribution along with thecorresponding probit function is given in Figure 12.18igure 12: Convolution of differences with M¨obius functionThe results for the zeta function zeros are similar to those for the n − x values. In this section, l is restricted to being prime. Since l cannot divide nd + 1and n (cid:48) d + 1 for equal d , the mapping of the rotated floor parity vector tothe ceiling parity vector for all possible n values is one-to-one. The values of nd + 1 modulo l determines a ”basis”. For example, the basis for l = 31 is19 valuesleast residue = 1 : 30 , , , , , , ,
13 : 23 ,
45 : 22 , , ,
77 : 27 , , , , ,
88 : 19 , , , , , { , , , , , , , , } . The maximumnumber of distinct prime factors is 3.A plot of the number of elements in a basis versus the primes less than 10000is given in Figure 13. 20igure 13: Number of elements in a basis versus the primesFor a quadratic least-squares fit of the curve, p = − . · − with a95% confidence interval of ( − . · − , − . · − ), p = 0 . p = 12 .
96 with a 95% con-fidence interval of (11.26, 14.66), SSE=1 . · , R-squared=0.9997, andRMSE=11.41.A plot of the maximum number of distinct prime factors of the elementsof a basis versus the square roots of the primes less than 10000 is given inFigure 14. 21igure 14: Maximum number of distinct prime factors versus square roots ofprimesFor a linear least-squares fit of the curve, p = 0 . p = 1 .
123 with a 95% confidence interval of(0.7893, 1.456), SSE=5875, R-squared=0.9017, and RMSE=2.189.A plot of the logarithm of the histogram of the number of elements in a basisis given in Figure 15. 22igure 15: Logarithm of histogram of number of elements in a basisFor a quadratic least-squares fit of the curve, p = 0 . p = − . p = 7 .
759 with a 95% confidence of (7.7073,8.445), SSE=4.648, R-squared=0.9568, and RMSE=0.9496.23 eferences [1] L. Halbeisen and N. Hungerb¨uhler, Optimal bounds for the length ofrational Collatz cycles,
Acta Arith. , LXXVIII.3 (1997), 227–239[2] J. C. Lagarias, The set of rational cycles for the 3 x + 1 problem, ActaArith. , (1990), 33–53[3] P. Mihˇailescu, Primary Cyclotomic Units and a Proof of Catalan’s Con-jecture, J. reine angew. Math. (2004), 167–195[4] H. Weyl, ¨Uber ein Problem aus dem Gebiete der diophantischen Ap-proximationen,
Nachr. Ges. Wiss. G¨ottingen , Math.-phys. Kl., ,234–244[5] H. Weyl, ¨Uber die Gleichverteilung von Zahlen mod. Eins,
Math. Ann. , (1916), 313–352[6] W. J. LeVeque, On uniform distribution modulo a subdivision, PacificJ. Math. ,3