Let us call a real sequence eventually periodic if positive numbers such that . The smallest such is called the period of the eventually periodic sequence.
Is the following sequence eventually periodic?
If it is, find its period.
Put as your answer if you think that the sequence is not eventually periodic.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The proof turned out to be tediously long. So, bear with me.
First, we make the following claim:
The sequence { c n } n ≥ 0 with c 0 ∈ [ 0 , 1 ] is eventually periodic iff c 0 is rational.
Proof:
if part: Let c 0 be a rational number in [ 0 , 1 ] . For c 0 = 0 , 1 , the sequence becomes { 1 , 0 , 1 , 0 , ⋯ } and { 0 , 1 , 0 , 1 , ⋯ } respectively, which is clearly periodic with period 2 . So now on we consider the case 0 < c 0 < 1 . Now we make the following simple observation, which can be easily verified by direct computation:
If c 0 < 1 / 2 k , for some k ( 1 ≤ k ≤ 2 ) , c n = 2 n c 0 , 1 ≤ n ≤ k .
Note that c k = 2 k c 0 < 1 . If c k ∈ ( 0 , 1 / 2 ) , then from the recursion, we have c k + 1 = 2 c k ∈ ( 0 , 1 ) ; otherwise, c k + 1 = 2 ( 1 − c k ) ∈ ( 0 , 1 ) since in this case c k ∈ ( 1 / 2 , 1 ) . So, in any case the sequence is bounded, and obviously positive, and hence has positive limit points. Note that this observation is valid for any c 0 ∈ ( 0 , 1 ) .
Since at each iteration c k + 1 is of the form 2 a k ± 2 c k where a k is a constant number in { 0 , − 2 } , c k is always a rational number if c 0 is rational and is always in 0 , 1 . Then, at some iteration k , let, ∃ p , q ∈ N , p < q , g cd ( p , q ) = 1 , such that c k = q p . Also, note that because of the previous observations, if c 0 = 2 m 1 for some m , then, c m = 1 , and then onwards it is the 1 , 0 , 1 , 0 , ⋯ sequence. So we take c 0 = 2 k 1 . Now we consider two cases,
Case 1: p < q / 2 : Then c k + 1 = q 2 p . If 2 ∣ q , then, c k + 1 = ( q / 2 ) p , where g cd ( p , q / 2 ) = 1 , thus we have c k + 1 = q ′ p ′ , with p ′ = p , and q ′ = q / 2 , with q ′ having one less power of 2 in its factorization. If q is odd, then we have c k + 1 = q ′ p ′ with p ′ = 2 p , q ′ = q , p ′ < q ′ , g cd ( p ′ , q ′ ) = 1 .
Case 2: q / 2 ≤ p < q : In this case c k + 1 = q 2 ( q − p ) . If q / 2 = p , the sequence becomes the 1 , 0 , 1 , 0 , ⋯ sequence from k + 1 onwards. Otherwise, If 2 ∣ q , then, c k + 1 = q / 2 q − p , and note that g cd ( q − p , q / 2 ) = 1 . Also, q − p < q / 2 , and note that q − p = p Thus we can write c k + 1 = q ′ p ′ , where p ′ = q − p , q ′ = q / 2 , g cd ( p ′ , q ′ ) = 1 , p ′ < q ′ . If q is odd then c k + 1 = q ′ p ′ , p ′ = 2 ( q − p ) , q ′ = q , p ′ < q ′ , g cd ( p ′ , q ′ ) = 1 .
From the above two cases we can see that if 2 l ∣ q , after l iterations we have c l + k = q ′ p ′ where both p ′ , q ′ are odd. Let us assume that m is the iteration number where q ′ becomes odd for the first time. In the next iterations, we see that the c k has the form q ′ p ′ , where the denominator remains the same q ′ , whereas, the numerator p ′ changes and takes distinct values. But p ′ can take only ϕ ( q ′ ) number of values, and hence ∃ some iteration m + j , 1 ≤ j ≤ ϕ ( q ′ ) , such that the value of p ′ after that iterations must coincide with an earlier value, i.e. ∃ some i ≤ m such that c i = c m + j . Thus, the sequence becomes eventually periodic with period ≤ ϕ ( q ′ ) .
only if part: Let c 0 be an irrational number in ( 0 , 1 ) . Now, if c 0 ∈ ( 1 / 2 , 1 ) , c 1 = 2 ( 1 − c 0 ) , and consequently, c n is of the form 2 a n ± n n c 0 , for all n ≥ 1 with a n integer, [I am not providing a proof for this statement, though I think this is pretty straightforward to proof, maybe by induction]. On the other hand, if c 0 ∈ ( 0 , 1 / 2 ) , there exists k ≥ 1 , such that c n = 2 n c 0 , ∀ 1 ≤ n ≤ k , and c k + 1 = 2 ( 1 − c k ) . Since c 0 is irrational, it is not possible to have c k = 1 , and thus, ∀ n ≥ k + 1 , again we have c n of the form 2 a n ± 2 n c 0 . Thus, if c n is eventually periodic, we can find some large m (i.e. m ≥ k + 1 ), and some positive integer N such that c m = c m + N ⟹ 2 ( a m − a m + N ) = ± 2 m ( 2 N ± 1 ) c 0 , which is absurd as LHS is rational, whereas RHS is not. Thus the sequence { c n } cannot be eventually periodic. ■
Let us now try to find a way to find the period of the sequence { c n } n ≥ 0 , when c 0 is of the form c 0 = p 1 , where p is an odd prime. First of all, as discussed earlier, since p is odd, in the evolution of c n , only the numerator will change and the denominator will remain constant. Thus, it is enough to look at the sequence constituted by the numerators. In the sequel we will denote by a n the numerator of c n .
We claim the following:
Let a n + 1 = 2 k , n ≥ 1 . Then a n = 2 a n + 1 if k is even and a n = p − 2 a n + 1 , if k is odd
Proof: Observe that if k is even and a n = p − 2 a n + 1 = p − k , then a n is odd, which is not possible since every a n is even for n ≥ 1 . In a similar fashion, it is easy to see that if k is odd, we must have a n = p − 2 a n + 1 . ■
Here is another claim:
The sequence { a n } is eventually periodic with period N , where N = min { n ≥ 1 : a n + 1 = 2 } Proof: Let N be the period and m be defined as m = min { n ≥ 0 : a m = a m + N } Note that m = 0 is not possible, since from the recursion, a m is even for all m ≥ 1 , and a 0 = 1 . If m > 1 , then, from the characterization of a m − 1 from the last claim, we find that a m − 1 = a m − 1 + N which violates the minimality of m . If m = 1 , however, the characterization in the last claim does not apply, and is the only possible option. Since we know that the sequence has to be eventually periodic, this is the only option. Thus, the claim follows. ■
Finally (Phew..) we claim the following:
The sequence { a n } n ≥ 0 is eventually periodic with period 4 o r d p ( 2 ) ( 3 − ( − 1 ) o r d p ( 2 ) ) where o r d p ( 2 ) = min { k ≥ 1 : 2 k ≡ 1 ( m o d p ) }
Proof: Since the last claim shows that a N + 1 = 2 , we must have a N = p − 1 . Then, a N − 1 = 2 p − 1 , if, 2 ( p − 1 ) is even, and otherwise, a N − 1 = p − 2 p − 1 . Continuing in this manner it is not difficult to show that the form of a i will be either of the following forms p − 2 l j + 2 p − 2 l j + 1 p − ⋯ 2 l j p − 2 l 0 p − 1 , 2 l k + 3 p − 2 l k + 2 p − 2 l k + 1 p − ⋯ 2 l k p − 2 l 0 p − 1 At the end, we should get a 0 = 1 , which means that we should get the following type of equation: 2 l k + 3 p − 2 l k + 2 p − 2 l k + 1 p − ⋯ 2 l k p − 2 l 0 p − 1 = 1 ⟹ p ( 2 ∑ j = 0 k + 2 l j − 2 ∑ j = 0 k + 1 l j + ⋯ s k ) = 2 ∑ j = 0 k + 3 l j + s k ) where s k = ± . Thus if p ∣ 2 k − 1 and p ∣ 2 l + 1 , then whichever number is smaller, for that the multiplier of p can be uniquely expressed (Needs to be proven, but seems to be true) in the form of the multiplier of p as shown above, and that representation will then uniquely determine the numbers a 1 , ⋯ , a N + 1 . Hence the period must be k if 2 k − 1 < 2 l + 1 , or l if 2 l + 1 < 2 k − 1 [Note that the period is actually the exponent ∑ j = 0 k + 3 l j ]. By definition of multiplicative order, we have that N ∣ o r d p ( 2 ) . Now, if the order is odd, then there is no such l such that 2 l + 1 < 2 o r d p ( 2 ) − 1 , because otherwise 2 l ∣ o r d p ( 2 ) which is not possible. So, then period is o r d p ( 2 ) . On the other hand if o r d p ( 2 ) is even, then, p ∣ 2 o r d p ( 2 ) / 2 + 1 , and there is no smaller number of this form that is divisible by p . Hence, then the period is o r d p ( 2 ) / 2 . Together they prove the claim. ■ (Phew...)
Since here p = 2 0 1 7 , o r d 2 0 1 7 ( 2 ) = 3 3 6 , and hence the period is 3 3 6 / 2 = 1 6 8 .