For k ≥ 1 , let a k be the greatest divisor of k which is not a multiple of 3 .
Set S 0 = 0 and S k = a 1 + a 2 + . . . + a k for k ≥ 1 .
Find the number of integers k with 0 ≤ k < 3 1 5 such that S k is divisible by 3 .
Note A generalization of this problem was once proposed for IMO .
Try other interesting combinatorics in my set Hard
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.
Nice problem! Do you know when it was proposed for the IMO? I'd like to find out more about the background of this problem.
Was all of this really reqd. I managed it by just using the fact that such nos. are only of form 3k-1. And all natural No's. <= 3^15. of such type satisfied it. I.e. No's. Like 2,5,8,...... To 3^15. The no. Of terms of the A. P. gives the final ans. As. G. I. F. OF [3^14+1÷3].
True. I was a bit puzzled too when I saw such a complex solution.
Probably fine here, but if this was on the IMO, you'll need a more rigorous proof.
I think you've got the right answer by accident -- not completely a coincidence, since of course the answer is that roughly 1/3 of the numbers are of the right form. But in fact S1=1, S2=3, S3=4, S4=8, S5=13 (not a multiple of 3, while your pattern says it should be), S6=15 (a multiple of 3, while your pattern says it shouldn't be). The pattern posted in other solutions, involving 1s in the ternary representation, is correct.
This was a fun puzzle. Warning: I'm in a computer scientist by nature so my solutions usually have a non purely-analytic nature to them. Here's how I solved this puzzle with linear algebra by reducing this to a rewrite system.
The difficult part of the problem depends on finding a nice recurrence to describe the system. Suppose that ( 2 n + 1 ) describes the total of 1 , … , n , then it is clear that S n = ( 2 n + 1 ) − 2 ( 2 ⌊ 3 n ⌋ + 1 ) − 2 ( 2 ⌊ 3 2 n ⌋ + 1 ) − ⋯ With a bit of manipulation, and appealing to the fact the ⋯ in the above sum terminates after a finite ( ⌊ lo g 3 ( n ) ⌋ ) number of times, we shall see that S n = ( 2 n + 1 ) + S ⌊ n / 3 ⌋ − 3 ( 2 ⌊ 3 n ⌋ + 1 )
Theorem: Let T n = S n mod 3 , then T 0 = 0 , T 1 = 1 , T 2 = 0 and T 3 n + m = T n + [ m ≡ 1 ] Proof: Follows from the definition of S n . □
Corollary: It is the case that T 3 n = T n Proof: Also follows from the definition of S n . □
The above two lemmas tells us two things: 1) we can uniquely determine what S 3 n + 1 , S 3 n + 2 are from S 3 n . 2) The subsequence ( T 0 , T 3 , T 6 , ⋯ ) = ( T 0 , T 1 , T 2 , ⋯ ) .
Now, in order to solve this problem, let us look at a tower of sequences.
Let T 1 5 T 1 4 T 1 3 T 1 T 0 = ( T 0 ) = ( T 0 , T 3 1 4 , T 2 × 3 1 4 ) = ( T 0 , T 3 1 3 , ⋯ , T 8 × 3 1 4 ) ⋮ = ( T 0 , T 3 , ⋯ , T 3 1 5 − 3 ) = ( T 0 , T 1 , ⋯ , T 3 1 5 − 1 )
Based on the theorem we've proved above, we know that if we see a 0 in T k + 1 , then it would expand into the sequence ( 0 , 1 , 0 ) in T k . Similarly, 1 ↦ ( 1 , 2 , 1 ) and 2 ↦ ( 2 , 0 , 2 ) . Now we're onto something.
Let F ( T k + 1 ) = T k be the reduction rule. Suppose that we define a surjection γ ( ( 0 , 1 , 2 , 0 , 2 , 0 , 0 , 0 ) ) = ( 5 , 1 , 2 ) that counts the number of occurrences of 0, 1, and 2 respectively, then it turns out that we can transfer our reduction transformation F ( T k + 1 ) into a linear transformation γ ( F ) = ⎝ ⎛ 2 1 0 0 2 1 1 0 2 ⎠ ⎞
This is because each instance of 0 in T k can be generated twice from a 0 in T k + 1 and once from a 2, so on for 1 and 2 as well. The crucial feature of the problem that enables us to construct this surjective counting is the fact that the ordering of T n isn't important.
Finally, we wish to find the count of T n that are zero, which is solved by taking ( 1 0 0 ) γ ( T 0 ) = ( 1 0 0 ) γ ( F ) 1 5 γ ( T 1 5 ) = ( 1 0 0 ) ⎝ ⎛ 2 1 0 0 2 1 1 0 2 ⎠ ⎞ 1 5 ⎝ ⎛ 1 0 0 ⎠ ⎞
You can compute this on a CAS if you want, but its characteristic polynomial ρ ( x ) = ( x − 3 ) ( x 2 − 3 x + 3 ) has roots λ = 3 , 2 3 ± i 3 , which means that the count is α 3 n + β ( 2 3 + i 3 ) n + γ ( 2 3 + i 3 ) n = 3 n − 1 So in our case, we just have 3 1 5 − 1 = 4 7 8 2 9 6 9 .
Problem Loading...
Note Loading...
Set Loading...
Generalization For k ≥ 1 , let a k be the greatest divisor of k which is not a multiple of 3 .
Set S 0 = 0 and S k = a 1 + a 2 + . . . + a k for k ≥ 1 .
Let A n be the number of integers 0 ≤ k < 3 n such that S k is divisible by 3 .
Then A n = 3 3 n + 2 . 3 n / 2 c o s ( n π / 6 ) .
Proof : It is easy to see that a 3 k = a k , a 3 k + 1 = 3 k + 1 , a 3 k + 2 = 3 k + 2
Now, S 0 ≡ 0 ( m o d 3 ) , S 1 ≡ 1 ( m o d 3 ) and S 2 ≡ 0 ( m o d 3 )
I claim that S 3 k ≡ S k ( m o d 3 ) , S 3 k + 1 ≡ S k + 1 ( m o d 3 ) and S 3 k + 2 ≡ S k ( m o d 3 ) .
I will prove it by induction on k .Suppose the result is true for k .
Then, S 3 k + 3 = S 3 k + 2 + a 3 k + 3 ≡ S k + a k + 1 = S k + 1 ( m o d 3 )
S 3 k + 4 = S 3 k + 3 + a 3 k + 4 ≡ S k + 1 + 3 k + 4 ≡ S k + 1 + 1 ( m o d 3 )
Finally, S 3 k + 5 = S 3 k + 4 + a 3 k + 5 ≡ S k + 1 + 1 + 5 ≡ S k + 1 ( m o d 3 )
Let T k be the number of 1 's in the ternary (base 3 ) representation of k .
T 0 = 0 , T 1 = 1 and T 2 = 0
A little thinking shows T 3 k = T k , T 3 k + 1 = T k + 1 and T 3 k + 2 = T k
Hence, S k ≡ T k ( m o d 3 ) .Therefore, A n is the number of integers 0 ≤ k ≤ 3 n that has ternary representation in which the number of 1 's is a multiple of 3.
Now,there are 2 n − j ( j n ) integers less than 3 n which have j ones in their ternary representation, since there are ( j n ) ways to choose the places for 1 and 2 n − j ways to put 0 or 2 in the remaining n − j places.
Hence, A n = ∑ j ≡ 0 ( m o d 3 ) ( j n ) 2 n − j
Let f ( x ) = ( x + 2 ) n = ∑ j = 0 n ( j n ) x j 2 n − j
Let ω = e 2 π i / 3 be cube root of unity.
By, Multisection Formula
A n = 3 f ( 1 ) + f ( ω ) + f ( ω 2 ) = 3 3 n + 2 . 3 n / 2 c o s ( 6 n π ) (Simplifying)
Putting n = 1 5 gives the required answer.
Note The Multisection Formula says-
If f ( x ) = ∑ k a k x k , then ∑ k ≡ r ( m o d m ) a k x k = m 1 ∑ s = 0 m − 1 ω − r s f ( ω s x ) where ω = e 2 π i / m .