( a 1 , a 2 , ⋯ , a 2 0 1 4 ) of ( 1 , 2 , ⋯ , 2 0 1 4 ) is called good if for all positive integers k ≤ 2 0 1 4 , 2 ( a 1 + a 2 + ⋯ + a k ) is a multiple of k . Find the last three digits of the number of good permutations of ( 1 , 2 , ⋯ , 2 0 1 4 ) .
A permutationDetails and assumptions
The general condition is k ∣ 2 i = 1 ∑ k a i for all positive integers k ≤ 2 0 1 4 .
This problem is not original.
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.
There are lots of errors in the solution. Please amend them. But the idea is nice. I did the same, recursive method.
Sreejato, I like your solution. I used basically the same method.
When constructing the good permutations of 1 , 2 , … , n + 1 from good permutations of 1 , 2 , … , n , I preferred using the following two constructions:
Simply append n + 1 to the end: ( a 1 , a 2 , … , a n ) → ( a 1 , a 2 , … , a n , n + 1 )
Add 1 to each of them and then append 1 to the end: ( a 1 , a 2 , … , a n ) → ( a 1 + 1 , a 2 + 1 , … , a n + 1 , 1 )
(also, I think there is a typo in your proof. You wrote 2 k + 2 in two places where I think you meant 2 k + 1 )
Problem Loading...
Note Loading...
Set Loading...
Let E k denote the number of good permutations of ( a 1 , a 2 , ⋯ , a k ) .
Claim: E k + 1 = 2 E k ∀ k ∈ N ≥ 3
Proof: Let ( a 1 , a 2 , ⋯ , a k , a k + 1 ) be any good permutation of ( 1 , 2 , ⋯ , k ) . Note that k ∣ 2 ( a 1 + a 2 + ⋯ + a k ) ⟹ ⟹ ⟹ k ∣ 2 ( a 1 + a 2 + ⋯ + a k + 1 ) − 2 a k + 1 k ∣ 2 ( 1 + 2 + ⋯ + ( k + 1 ) ) − 2 a k + 1 k ∣ ( k + 1 ) ( k + 2 ) − 2 a k + 1 . But, ( k + 1 ) ( k + 2 ) − 2 a k + 1 ≡ 1 ⋅ 2 = 2 a k + 1 ≡ 2 ( 1 − a k + 1 ) ( m o d k ) , so 2 ( a k + 1 − 1 ) must be a multiple of k . Thus, a k + 1 is either 1 , 2 k + 2 , or k + 1 .
I claim a k + 1 = 2 k + 1 . Assume the contrary. Note that 2 ( a 1 + a 2 + ⋯ + a k − 1 ) = = = ≡ 2 ( a 1 + a 2 + ⋯ + a k + 1 ) − 2 a k − 2 a k + 1 2 ( 1 + 2 + ⋯ + ( k + 1 ) ) − 2 a k − ( k + 2 ) ( k + 1 ) ( k + 2 ) − ( k + 2 ) − 2 a k 1 − 2 a k ( m o d k ) . Thus, 2 a k − 1 must be a multiple of k , so a k = 2 k + 2 . But this implies a k = a k + 1 , contradiction.
Thus, a k + 1 is either k + 1 or 1 . We have E k good permutations of ( 1 , 2 , ⋯ , k + 1 ) where a k + 1 = k + 1 . We also have E k good permutations of k + 1 where a k + 1 = 1 because for any good permutation ( a 1 , a 2 , ⋯ , a n , a n + 1 ) where a n + 1 = k + 1 , ( n + 2 ) − a 1 , ( n + 2 ) − a 2 , ⋯ , ( n + 2 ) − a 3 , ⋯ , ( n + 2 ) − a n + 1 ) forms a good permutation with its last element n + 2 − ( n + 1 ) = 1 . Thus, E k + 1 = E k + E k = 2 E k , proving our claim. ■
Note that all permutations of ( 1 , 2 , 3 ) are good, so E 3 = 3 ! = 6 . Now, solving the recurrence for E k gives E k = 3 ⋅ 2 k − 1 . Our desired answer is E 2 0 1 4 = 3 ⋅ 2 2 0 1 3 , whose last three digits are 2 8 8 .
This problem is adapted from ISL 2008 C2 .