An eventually periodic sequence

Let us call a real sequence { a n } n 0 \{a_n\}_{n\ge 0} eventually periodic if \exists positive numbers m , N m,N such that a n + N = a n , n m a_{n+N}=a_n,\ \forall n\ge m . The smallest such N N is called the period of the eventually periodic sequence.

Is the following sequence eventually periodic? c 0 = 1 2017 , c n = 1 1 2 c n 1 , n 1 c_0=\frac{1}{2017},\quad c_{n}=|1-|1-2c_{n-1}||,\quad n\ge 1

If it is, find its period.

Put 666 666 as your answer if you think that the sequence is not eventually periodic.


The answer is 168.

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.

1 solution

The proof turned out to be tediously long. So, bear with me.

First, we make the following claim:

The sequence { c n } n 0 \{c_n\}_{n\ge 0} with c 0 [ 0 , 1 ] c_0\in [0,1] is eventually periodic iff c 0 c_0 is rational.

Proof:

if part: Let c 0 c_0 be a rational number in [ 0 , 1 ] [0,1] . For c 0 = 0 , 1 c_0=0,1 , the sequence becomes { 1 , 0 , 1 , 0 , } \{1,0,1,0,\cdots\} and { 0 , 1 , 0 , 1 , } \{0,1,0,1,\cdots\} respectively, which is clearly periodic with period 2 2 . So now on we consider the case 0 < c 0 < 1 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 c_0<1/2^{k} , for some k ( 1 k 2 ) k (1\le k\le 2) , c n = 2 n c 0 , 1 n k c_n=2^n c_0,\ 1\le n\le k .

Note that c k = 2 k c 0 < 1 c_k=2^kc_0<1 . If c k ( 0 , 1 / 2 ) c_k\in (0,1/2) , then from the recursion, we have c k + 1 = 2 c k ( 0 , 1 ) c_{k+1}=2c_k\in (0,1) ; otherwise, c k + 1 = 2 ( 1 c k ) ( 0 , 1 ) c_{k+1}=2(1-c_k)\in (0,1) since in this case c k ( 1 / 2 , 1 ) c_k\in (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 ) c_0\in (0,1) .

Since at each iteration c k + 1 c_{k+1} is of the form 2 a k ± 2 c k 2a_k\pm 2c_k where a k a_k is a constant number in { 0 , 2 } \{0,-2\} , c k c_k is always a rational number if c 0 c_0 is rational and is always in 0 , 1 0,1 . Then, at some iteration k k , let, p , q N , p < q , gcd ( p , q ) = 1 \exists p,q\in \mathbb{N},\ p< q, \gcd(p,q)=1 , such that c k = p q c_k=\frac{p}{q} . Also, note that because of the previous observations, if c 0 = 1 2 m c_0=\frac{1}{2^m} for some m m , then, c m = 1 c_m=1 , and then onwards it is the 1 , 0 , 1 , 0 , 1,0,1,0,\cdots sequence. So we take c 0 1 2 k c_0\ne \frac{1}{2^k} . Now we consider two cases,

Case 1: p < q / 2 p<q/2 : Then c k + 1 = 2 p q c_{k+1}=\frac{2p}{q} . If 2 q 2|q , then, c k + 1 = p ( q / 2 ) c_{k+1}=\frac{p}{(q/2)} , where gcd ( p , q / 2 ) = 1 \gcd(p,q/2)=1 , thus we have c k + 1 = p q c_{k+1}=\frac{p'}{q'} , with p = p p'=p , and q = q / 2 q'=q/2 , with q q' having one less power of 2 2 in its factorization. If q q is odd, then we have c k + 1 = p q c_{k+1}=\frac{p'}{q'} with p = 2 p , q = q , p < q , gcd ( p , q ) = 1 p'=2p,\ q'=q,\ p'<q', \gcd(p',q')=1 .

Case 2: q / 2 p < q q/2\le p<q : In this case c k + 1 = 2 ( q p ) q c_{k+1}=\frac{2(q-p)}{q} . If q / 2 = p q/2=p , the sequence becomes the 1 , 0 , 1 , 0 , 1,0,1,0,\cdots sequence from k + 1 k+1 onwards. Otherwise, If 2 q 2|q , then, c k + 1 = q p q / 2 c_{k+1}=\frac{q-p}{q/2} , and note that gcd ( q p , q / 2 ) = 1 \gcd(q-p,q/2)=1 . Also, q p < q / 2 q-p< q/2 , and note that q p p q-p\ne p Thus we can write c k + 1 = p q c_{k+1}=\frac{p'}{q'} , where p = q p , q = q / 2 , gcd ( p , q ) = 1 , p < q p'=q-p,\ q'=q/2, \gcd(p',q')=1,\ p'<q' . If q q is odd then c k + 1 = p q , p = 2 ( q p ) , q = q , p < q , gcd ( p , q ) = 1 c_{k+1}=\frac{p'}{q'},\ p'=2(q-p),\ q'=q,\ p'<q', \gcd(p',q')=1 .

From the above two cases we can see that if 2 l q 2^l|q , after l l iterations we have c l + k = p q c_{l+k}=\frac{p'}{q'} where both p , q p',q' are odd. Let us assume that m m is the iteration number where q q' becomes odd for the first time. In the next iterations, we see that the c k c_k has the form p q \frac{p'}{q'} , where the denominator remains the same q q' , whereas, the numerator p p' changes and takes distinct values. But p p' can take only ϕ ( q ) \phi(q') number of values, and hence \exists some iteration m + j m+j , 1 j ϕ ( q ) 1\le j\le \phi(q') , such that the value of p p' after that iterations must coincide with an earlier value, i.e. \exists some i m i\le m such that c i = c m + j c_i=c_{m+j} . Thus, the sequence becomes eventually periodic with period ϕ ( q ) \le \phi(q') .

only if part: Let c 0 c_0 be an irrational number in ( 0 , 1 ) (0,1) . Now, if c 0 ( 1 / 2 , 1 ) c_0\in (1/2,1) , c 1 = 2 ( 1 c 0 ) c_1=2(1-c_0) , and consequently, c n c_n is of the form 2 a n ± n n c 0 2a_n\pm n^n c_0 , for all n 1 n\ge 1 with a n 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 ) c_0\in (0,1/2) , there exists k 1 k\ge 1 , such that c n = 2 n c 0 , 1 n k c_n=2^n c_0, \forall 1\le n\le k , and c k + 1 = 2 ( 1 c k ) c_{k+1}=2(1-c_k) . Since c 0 c_0 is irrational, it is not possible to have c k = 1 c_k=1 , and thus, n k + 1 \forall n\ge k+1 , again we have c n c_n of the form 2 a n ± 2 n c 0 2a_n\pm 2^n c_0 . Thus, if c n c_n is eventually periodic, we can find some large m m (i.e. m k + 1 m\ge k+1 ), and some positive integer N N such that c m = c m + N 2 ( a m a m + N ) = ± 2 m ( 2 N ± 1 ) c 0 c_m=c_{m+N}\implies 2(a_m-a_{m+N})=\pm2^m (2^N\pm 1)c_0 , which is absurd as LHS is rational, whereas RHS is not. Thus the sequence { c n } \{c_n\} cannot be eventually periodic. \blacksquare


Let us now try to find a way to find the period of the sequence { c n } n 0 \{c_n\}_{n\ge 0} , when c 0 c_0 is of the form c 0 = 1 p c_0=\frac{1}{p} , where p p is an odd prime. First of all, as discussed earlier, since p p is odd, in the evolution of c n 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 a_n the numerator of c n c_n .

We claim the following:

Let a n + 1 = 2 k , n 1 a_{n+1}=2k,\ n\ge 1 . Then a n = a n + 1 2 a_{n}=\frac{a_{n+1}}{2} if k k is even and a n = p a n + 1 2 a_{n}=p-\frac{a_{n+1}}{2} , if k k is odd

Proof: Observe that if k k is even and a n = p a n + 1 2 = p k a_n=p-\frac{a_{n+1}}{2}=p-k , then a n a_n is odd, which is not possible since every a n a_n is even for n 1 n\ge 1 . In a similar fashion, it is easy to see that if k k is odd, we must have a n = p a n + 1 2 a_n=p-\frac{a_{n+1}}{2} . \blacksquare

Here is another claim:

The sequence { a n } \{a_n\} is eventually periodic with period N N , where N = min { n 1 : a n + 1 = 2 } N=\min\{n\ge 1: \ a_{n+1}=2\} Proof: Let N N be the period and m m be defined as m = min { n 0 : a m = a m + N } m=\min\{n\ge 0: a_m=a_{m+N}\} Note that m = 0 m=0 is not possible, since from the recursion, a m a_m is even for all m 1 m\ge 1 , and a 0 = 1 a_0=1 . If m > 1 m>1 , then, from the characterization of a m 1 a_{m-1} from the last claim, we find that a m 1 = a m 1 + N a_{m-1}=a_{m-1+N} which violates the minimality of m m . If m = 1 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. \blacksquare

Finally (Phew..) we claim the following:

The sequence { a n } n 0 \{a_n\}_{n\ge 0} is eventually periodic with period o r d p ( 2 ) 4 ( 3 ( 1 ) o r d p ( 2 ) ) \frac{\mathrm{ord}_{p}(2)}{4}(3-(-1)^{\mathrm{ord}_{p}(2)}) where o r d p ( 2 ) = min { k 1 : 2 k 1 ( m o d p ) } \mathrm{ord}_p(2)=\min\{k\ge 1: 2^k\equiv 1(\mod p)\}

Proof: Since the last claim shows that a N + 1 = 2 a_{N+1}=2 , we must have a N = p 1 a_N=p-1 . Then, a N 1 = p 1 2 a_{N-1}=\frac{p-1}{2} , if, ( p 1 ) 2 \frac{(p-1)}{2} is even, and otherwise, a N 1 = p p 1 2 a_{N-1}=p-\frac{p-1}{2} . Continuing in this manner it is not difficult to show that the form of a i a_i will be either of the following forms p p p p p 1 2 l 0 2 l j 2 l j + 1 2 l j + 2 , p p p p p 1 2 l 0 2 l k 2 l k + 1 2 l k + 2 2 l k + 3 p-\frac{p-\frac{p-\cdots\frac{p-\frac{p-1}{2^{l_0}}}{2^{l_j}}}{2^{l_{j+1}}}}{2^{l_{j+2}}},\quad \frac{p-\frac{p-\frac{p-\cdots\frac{p-\frac{p-1}{2^{l_0}}}{2^{l_k}}}{2^{l_{k+1}}}}{2^{l_{k+2}}}}{2^{l_{k+3}}} At the end, we should get a 0 = 1 a_0=1 , which means that we should get the following type of equation: p p p p p 1 2 l 0 2 l k 2 l k + 1 2 l k + 2 2 l k + 3 = 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 ) \frac{p-\frac{p-\frac{p-\cdots\frac{p-\frac{p-1}{2^{l_0}}}{2^{l_k}}}{2^{l_{k+1}}}}{2^{l_{k+2}}}}{2^{l_{k+3}}}=1\\\implies p\left(2^{\sum_{j=0}^{k+2}l_{j}}-2^{\sum_{j=0}^{k+1}l_j}+\cdots s_k \right)= 2^{\sum_{j=0}^{k+3}l_j}+s_k) where s k = ± s_k=\pm . Thus if p 2 k 1 p|2^{k}-1 and p 2 l + 1 p|2^{l}+1 , then whichever number is smaller, for that the multiplier of p p can be uniquely expressed (Needs to be proven, but seems to be true) in the form of the multiplier of p p as shown above, and that representation will then uniquely determine the numbers a 1 , , a N + 1 a_1,\cdots, \ a_N+1 . Hence the period must be k k if 2 k 1 < 2 l + 1 2^k-1<2^l+1 , or l l if 2 l + 1 < 2 k 1 2^l+1<2^k-1 [Note that the period is actually the exponent j = 0 k + 3 l j \sum_{j=0}^{k+3} l_j ]. By definition of multiplicative order, we have that N o r d p ( 2 ) N|\mathrm{ord}_p(2) . Now, if the order is odd, then there is no such l l such that 2 l + 1 < 2 o r d p ( 2 ) 1 2^l+1<2^{\mathrm{ord}_p(2)}-1 , because otherwise 2 l o r d p ( 2 ) 2l|\mathrm{ord}_p(2) which is not possible. So, then period is o r d p ( 2 ) \mathrm{ord}_p(2) . On the other hand if o r d p ( 2 ) \mathrm{ord}_p(2) is even, then, p 2 o r d p ( 2 ) / 2 + 1 p|2^{\mathrm{ord}_p(2)/2}+1 , and there is no smaller number of this form that is divisible by p p . Hence, then the period is o r d p ( 2 ) / 2 \mathrm{ord}_p(2)/2 . Together they prove the claim. \blacksquare (Phew...)

Since here p = 2017 p=2017 , o r d 2017 ( 2 ) = 336 \mathrm{ord}_{2017}(2)=336 , and hence the period is 336 / 2 = 168 336/2=\boxed{168} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...