2 , 2 2 , 2 2 2 , 2 2 2 2 , … The sequence above can be recursively defined by a 1 = 2 , a k + 1 = 2 a k
Given a positive integer n , a new sequence is created by dividing each term { a k } by n and writing down the remainder of the division. We denote this new sequence by { b k } .
For a given n , it is known that the terms of { b k } eventually become constant. Let f ( n ) denote the index at which the constant values begin, i.e. f ( n ) is the smallest number i for which b i − 1 = b i = b i + 1 = b i + 2 = ⋯ .
Find f ( 2 0 1 6 ) + f ( 2 0 1 5 ) .
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.
Once we understand what the problem asks (which I didn't), it's not that hard.
We can use the Carmichael Lambda and Euler's Theorem; note that λ ( 2 0 1 5 ) = 6 0 , λ ( 6 0 ) = 4 , λ ( 2 0 1 6 ) = 2 4 and λ ( 2 4 ) = 2 .
Now we have, for any positive integer n ,
2 2 n ≡ 2 2 ( m o d 4 ) so 2 2 2 n ≡ 2 2 2 ( m o d 6 0 ) and 2 2 2 2 n ≡ 2 2 2 2 ( m o d 2 0 1 5 )
Likewise,
2 2 n ≡ 2 2 ( m o d 2 ) so 2 2 2 n ≡ 2 2 2 ( m o d 2 4 ) and 2 2 2 2 n ≡ 2 2 2 2 ( m o d 2 0 1 6 )
We can quickly verify that 2 2 2 = 1 6 isn't congruent to 2 2 2 2 = 6 5 5 3 6 modulo 2015 or 2016.
Thus f ( 2 0 1 5 ) = f ( 2 0 1 6 ) = 4 and the answer is 8.
Log in to reply
How would you have phrase this question then?
Log in to reply
n is used with different meanings: a n and b n vs modulo n ... using different letters would help.
Log in to reply
@Otto Bretscher – @Xuming Liang , what do you think?
Log in to reply
@Pi Han Goh – Thanks. I've edited the indices in the problem.
I agree that we should avoid having notation do double duty. You don't want to sit through a lecture where all the variables are "a", just of different size.
Log in to reply
Shouldn't b i + 1 = b i = b i + 1 = b i + 2 = ⋯ be
b i − 1 = b i = b i + 1 = b i + 2 = ⋯ ?
@Calvin Lin – BTW, @Calvin Lin , does my (rather short) solution make sense?
Log in to reply
@Otto Bretscher – Yes it does. Though, rather than Carmichael Lambda, we actually want something like the "order" of 2 power. You have only shown that 4 is the upper bound, and we still have to check that it is the minimum.
For example, if 2 was replaced by 1, then the answer is clearly f ( 2 0 1 5 ) = f ( 2 0 1 6 ) = 1 .
Log in to reply
@Calvin Lin – Thanks for your comments, @Calvin Lin
Yes, of course, we need to verify that 2 2 2 = 1 6 isn't congruent to 2 2 2 2 = 6 5 5 3 6 modulo 2015 or 2016; I will add this remark to my solution.
I agree that "in general" we want to think about the order of 2, but in this rather simple case we can get away with the Carmichael Lambda, which makes the solution much shorter and simpler.
Log in to reply
@Otto Bretscher – Agreed. I'm playing devil's advocate to the strength / completeness / rigour of a solution.
To find f ( 2 0 1 6 ) , write:
a n + 1 − a n = 2 0 1 6 k .
2 a n − 2 a n − 1 = 2 0 1 6 k
2 a n − 1 ( 2 a n − a n − 1 − 1 ) = 6 3 . 2 5 . k
Note that we must have
2 a n − a n − 1 ≡ 1 ( m o d 6 3 )
By Euler's theorem, since g cd ( 2 , 6 3 ) = 1
a n − a n − 1 ≡ 0 ( m o d ϕ ( 6 3 ) ) is a sufficient but unnecessary condition for the congruence above to hold.
Compute ϕ ( 6 3 ) = ϕ ( 7 ) ϕ ( 3 2 ) = 6 ( 3 2 − 3 ) = 3 6
Note that a 4 − a 3 = 2 2 2 2 − 2 2 2 = 2 2 2 ( 2 2 2 2 − 2 2 − 1 ) = 1 6 ( 2 1 2 − 1 )
Since 2 3 ≡ − 1 ( m o d 9 ) , we have 2 1 2 ≡ ( 2 3 ) 4 ≡ 1 ( m o d 9 ) .
Therefore, a 4 − a 3 = 1 6 ( 2 1 2 − 1 ) = 1 6 ( 9 q ) = 3 6 ( 4 q ) .
We check that a 5 − a 4 = 2 a 3 ( 2 a 4 − a 3 − 1 ) = 2 1 6 ( 6 3 p ) = 2 1 1 ( 2 0 1 6 p ) , which follows from Euler's theorem.
It is fairly easy to show that a 4 − a 3 is not divisible by 2 0 1 6 . Note that
a 4 − a 3 = 2 a 2 ( 2 a 3 − a 2 − 1 ) = 1 6 m , where m is an odd number. However, 2 0 1 6 = 3 2 . 6 3 , so obviously, a 4 = a 3 ( m o d 2 0 1 6 ) . We conclude that f ( 2 0 1 6 ) = 4 .
To find f ( 2 0 1 5 ) , write
a n + 1 − a n = 2 0 1 5 k .
2 a n − 2 a n − 1 = 2 0 1 5 k
2 a n − 1 ( 2 a n − a n − 1 − 1 ) = 2 0 1 5 k
Note that we must have
2 a n − a n − 1 ≡ 1 ( m o d 2 0 1 5 )
By Euler's theorem, since g cd ( 2 , 2 0 1 5 ) = 1
a n − a n − 1 ≡ 0 ( m o d ϕ ( 2 0 1 5 ) ) is a sufficient but unnecessary condition for the congruence above to hold.
Compute ϕ ( 2 0 1 5 ) = ϕ ( 5 ) ϕ ( 1 3 ) ϕ ( 3 1 ) = 4 . 1 2 . 3 0 = 1 4 4 0
Therefore, we obtain a n − a n − 1 ≡ 0 ( m o d 1 4 4 0 )
2 a n − 2 ( 2 a n − 1 − a n − 2 − 1 ) = 1 4 4 0 k = 3 2 . 4 5 k
For the congruence to hold, note that ( 2 a n − 1 − a n − 2 − 1 ) ≡ 0 ( m o d 4 5 ) .
By Euler's theorem, since g cd ( 2 , 4 5 ) = 1
a n − 1 − a n − 2 ≡ 0 ( m o d ϕ ( 4 5 ) ) is a sufficient but unnecessary condition for the congruence above to hold.
Compute ϕ ( 4 5 ) = ϕ ( 5 ) ϕ ( 3 2 ) = 4 . ( 3 2 − 3 ) = 2 4
Note that a 4 − a 3 = 2 2 2 2 − 2 2 2 = 2 2 2 ( 2 2 2 2 − 2 2 − 1 ) = 1 6 ( 2 1 2 − 1 ) = 1 6 ( 4 0 9 5 ) = 2 4 ( 2 7 3 0 ) .
We check that
2 a 3 ( 2 a 4 − a 3 − 1 ) = 2 1 6 ( 4 5 k ) = 1 4 4 0 ( 2 0 4 8 k )
Therefore, a 5 − a 4 = 2 a 3 ( 2 a 4 − a 3 − 1 ) = 2 1 6 ( 2 0 1 5 r ) follows from Euler's theorem.
It is fairly easy to show that a 4 − a 3 is not divisible by 2 0 1 5 . Note that
a 4 − a 3 = 2 a 2 ( 2 a 3 − a 2 − 1 ) = 1 6 ( 2 1 2 − 1 ) = 1 6 ( 2 . 2 0 1 5 + 6 5 ) = 3 2 . 2 0 1 5 + 1 0 4 0 .
Therefore, we conclude that f ( 2 0 1 5 ) = 4 .
f ( 2 0 1 5 ) + f ( 2 0 1 6 ) = 4 + 4 = 8 and we are done.
Great! Very detailed explanation.
Note that instead of "unnecessary condition", what you mean is that it is "not a necessary condition". I've not seen the latter expressed in the former way, though I can infer what you mean.
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Euler's Theorem
We will use the following observations to compute f ( n ) :
The first point is motivated by the chinese remainder theorem . Since a ≡ b ( m o d n ) ⟹ a ≡ b ( m o d p i e i ) because p i e i ∣ n , it is necessary for the { b } sequence of p i e i to start repeating the same value before the { b } sequence of n . By this reasoning, we have f ( n ) ≥ f ( p i e i ) for all i = 1 , 2 , . . . , k .
For the second point, we make use of a property of order : 2 a ≡ 2 b ( m o d p e ) ⟺ a ≡ b ( m o d ord p e ( 2 ) ) . For our problem specifically, we have a i ≡ a i + 1 ( m o d p e ) ⟺ a i − 1 ≡ a i ( m o d ord p e ( 2 ) ) In other words, the terms of { b } wrt p e repeats one index after those of { b } wrt ord p e ( 2 ) , hence the recursive formula is justified.
As a example, we can compute f ( 2 0 1 6 ) as follows:
f ( 2 5 ) = 4
f ( 3 2 ) = f ( 6 ) + 1 = f ( 3 ) + 1 = f ( 2 ) + 2 = 3
f ( 7 ) = f ( 3 ) + 1 = 3
Thus f ( 2 0 1 6 ) = max { f ( 2 5 ) , f ( 3 2 ) , f ( 7 ) } = 4
In a similar fashion, we can find f ( 2 0 1 5 ) = 4 . Hence the answer is 4 + 4 = 8 .