The teacher was writing a problem on the board. -
are positive integers. Prove that there is a way to put the number -1, 0 or 1 in the boxes such that is divisible by .
"Wait, that is all?"
"Correct. Now you have to find the maximum possible number to be put in the circle and then, prove it."
"Wait, could you put zero into all of the boxes so that the total expression equals to zero. Doesn't that divisible by any number except itself?"
"I am sorry. There must have been a mistake. Putting zero into all of the boxes is not a possibility. That would be too easy to solve."
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.
Amazing problem! After months of inactivity solving this was a great way to start again.
For notation's sake, I'll redefine some variables. △ i = a i , ◯ = N , □ i = b i = − 1 , 0 , 1 . If S = 1 ≤ i ≤ 1 6 ∑ b i a i is divisible by N , S ≡ 0 mod N . Hence, I'll be working in mod N . It should be noted that when working with mod N , it is susficient to consider a i ranging from 0 to N − 1 .
Ok here's my solution:
Claim: For N > 2 1 6 − 1 , there exists a set of integers a i such that no sequence of b i exists such that S ≡ 0 mod N
Proof: Consider a i = 2 i − 1 , 1 ≤ i ≤ 1 6 . Then every possible sequence c i = 0 , 1 would lead to S ′ = 1 ≤ i ≤ 1 6 ∑ c i a i being a unique integer from 1 ≤ S ′ ≤ 2 1 6 − 1 . This can be seen from the binary representation of S ′ . Note that our choice of a i forces − 2 1 6 + 1 ≤ S = 1 ≤ i ≤ 1 6 ∑ b i a i ≤ 2 1 6 − 1 . In order for S ≡ 0 mod N , S = 0 .
Now, a sequence b i can be computed by an element wise subtraction of 2 sequences of c i : c i ′ , c i ′ ′ : b i = c i ′ − c i ′ ′ . Suppose S 0 ′ = 1 ≤ i ≤ 1 6 ∑ c i ′ a i , S 1 ′ = 1 ≤ i ≤ 1 6 ∑ c i ′ ′ a i . Then S = 1 ≤ i ≤ 1 6 ∑ b i a i = S 0 ′ − S 1 ′ . In order for S = 0 , S 0 ′ = S 1 ′ . Since if c i ′ = c i ′ ′ , S 0 ′ = S 1 ′ , the only possible way S 0 ′ = S 1 ′ is if c i ′ = c i ′ ′ . This would mean b i = 0 for all 1 ≤ i ≤ 1 6 , which isn't allowed.
This would mean that N ≤ 2 1 6 − 1 . Here I make a bold claim:
Claim: N = 2 1 6 − 1 .
Proof: If N = 2 1 6 − 1 , then S mod N has 2 1 6 possible values, 0 ≤ S mod N ≤ 2 1 6 − 1 . Now we have 2 cases:
Case 1: S = 0 mod N . If this is so, then we are done! (Claim proven)
Case 2: S = 0 mod N . If this is so, then S mod N can have 2 1 6 − 1 possible values, 1 ≤ S mod N ≤ 2 1 6 − 1 . Now, each sequence c i would map to a (not necessarily unique) S ′ = 1 ≤ i ≤ 1 6 ∑ c i a i . Since there are a total of 2 1 6 possible sequences c i , by pigeonhole principle, there will be at least ceil ( 2 1 6 − 1 2 1 6 ) = 2 , c i : c i ′ , c i ′ ′ such that S 0 ′ ≡ S 1 ′ mod N . As such, b i can simply be constructed by taking the element-wise subtraction of the c i ′ , c i ′ ′ : b i = c i ′ − c i ′ ′ . As such, there would exist a sequence b i such that S = 0 mod N -- a contradiction. A such, case 2 is impossible.
Hence we have proven that N = 2 1 6 − 1 = 6 5 5 3 5 .