Arrange the numbers 1 − 3 2 , inclusive, in a circle such that the sum of any two adjacent numbers in the circular chain is a perfect square .
When you crack the Mystic Circle, you will obtain 3 2 Square numbers which are the sums of adjacent numbers.
If the number of times the squares 4 , 9 , 1 6 , 2 5 , 3 6 , 4 9 appear is given by A . B , C , D , E , F respectively, find 1 A + 2 B + 3 C + 4 D + 5 E + 6 F .
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! Thanks for sharing!
Log in to reply
Tx Swapnil. Congrats on solving it...
I worked on this for a couple of hours (don't know how to write a program for this), but I loved it. I wrote it all down in a table in Word, the ancient way 😁
Love this problem! Thank you for sharing! :)
Tx Ferren. Glad u enjoyed it!
I propose a solution in python 3.4:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
And of course this seems to have only one solution - just like any other problem on Brilliant (that I have seen).
Is this the smallest circle to have such a mystic circle? What is the next largest?
Officially to get the correct solution, you don't need to "solve" the mystic circle itself (assuming that you know there is a solution).
The sum of all the squares is 2 * (1 + 2 + 3... + 32), or 32 * 33, or 1056, as each number from 1 to 32 is used once
All that is needed then is to find a totally positive whole number solution to the two simultaneous equations a + b + c + d + e + f = 32 4a +9b +16c +25d +36e + 49f = 1056
By observation, you can see that the value of f has to be 8 (and that the value for e has to be at least 9, and that the value for a cannot be greater than 1), which helps to narrow down the search some more.
Log in to reply
Why does f has to be 8?
I think this is the smallest Mystic Circle , altough I don't have the time/will to try and derive a formal proof, but I am pretty confident about this being true. I also think that the next smallest Mystic Circle could be the one formed by the first 5 0 non-negative integers (so all the natural numbers ranging from 1 up to 5 0 ), but in this case the compulsory chains to begin with would be just two :
( 1 5 , 5 0 , 3 1 ) , ( 1 6 , 4 9 , 3 2 ) ,
which would implie the conditions:
H ≥ 2 , G ≥ 2 .
This means we would be left with 4 4 lonely numbers to deal with, and also the structural equation would be:
4 A + 9 B + 1 6 C + 2 5 D + 3 6 E + 4 9 F + 6 4 G + 8 1 H = 2 n = 1 ∑ 5 0 n = 2 5 5 0 ,
along with the condition:
A + B + C + D + E + F + G + H = 5 0 ,
and combining the two we could eliminate just the first variable, A , obtaining:
5 B + 1 2 C + 2 1 D + 3 2 E + 4 5 F + 6 0 G + 7 7 H = 2 3 5 0 ,
which could be narrowed a little bit by applying the conditions on H and G .
I think this equation would be too hard to solve by just "guessing and checking" by hand, without coding a program that would do it in a faster way, but essentialy just applying the typical brute force method.
Maybe someone with good Phyton programming skills, like @Abdelhamid Saadi, could work it out.
Because there are eight compulsory chains formed by three numbers each to begin with , in which the central number decreases from 3 2 to 2 5 (leaving exactly the eight lonely numbers 1 , 2 , 3 , 1 2 , 1 3 , 1 4 , 1 5 , 1 6 ), and each of these chains has two numbers that sum up to 4 9 and two numbers that sum up to 3 6 , we have, right at the beginning, the following conditions:
F ≥ 8 , E ≥ 8 .
But it is impossible to obtain another 4 9 by adding two numbers from different chains or by adding a tip number of any chain and any lonely number . Therefore, F = 8 .
But we can also observe that because of the compulsory links ( 1 7 − 1 9 ) , ( 1 8 − 7 ) , ( 2 0 − 1 6 − 9 ) , ( 1 − 8 ) , ( 1 5 − 1 0 ) , ( 2 3 − 2 − 1 4 ) and ( 3 − 1 3 − 1 2 ) , there are six compulsory chains to begin with, which are:
( 4 − 3 2 − 1 7 − 1 9 − 3 0 − 6 ) ( 5 − 3 1 − 1 8 − 7 − 2 9 − 2 0 − 1 6 − 9 − 2 7 − 2 2 ) ( 1 − 8 − 2 8 − 2 1 ) ( 1 5 − 1 0 − 2 6 − 2 3 − 2 − 1 4 ) ( 3 − 1 3 − 1 2 ) ( 2 1 − 2 5 − 2 4 )
This means we have exactly one 9 , two 1 6 , five 2 5 and two 3 6 more, so, even before starting the "guess and check", we have the following conditions:
F = 8 , E ≥ 1 0 D ≥ 5 , C ≥ 2 , B ≥ 1 .
Therefore, we can simplify the structural equation of the Mystic Circle from
4 A + 9 B + 1 6 C + 2 5 D + 3 6 E + 4 9 F = 2 n = 1 ∑ 3 2 n = 1 0 5 6
to
4 A + 9 β + 1 6 γ + 2 5 δ + 3 6 ε = 1 0 5 6 − 8 × 4 9 − 1 0 × 3 6 − 5 × 2 5 − 2 × 1 6 − 1 × 9 = 1 3 8
where B = 1 + β , C = 2 + γ , D = 5 + δ , E = 1 0 + ε and A + β + γ + δ + ε = 6 .
From the last condition, because we are adding five non-negative integers to make a six , by the pigeonhole principle we know that at least one of these integers must be at least equal to two .
At this point, note that A ≤ 2 , because if A = 3 , for example, even a value of ε = 3 wouldn't be enough for the total to be 1 3 8 , because 3 × 4 + 3 × 3 6 = 1 2 0 < 1 3 8 .
Because 1 3 8 ≡ 0 ( m o d 2 3 ) , applying some modulo- 2 3 arithmetic to the remainders 4 , 9 , 1 6 , 2 , 1 3 of the squares 4 , 9 , 1 6 , 2 5 , 3 6 when divided by 2 3 , it can be shown that A < 2 , because the only solution with A = 2 , which is A = 2 , γ = 3 , ε = 1 , is not valid since 2 × 4 + 3 × 1 6 + 1 × 3 6 = 9 2 = 1 3 8 .
By the same logic, it can be shown that A = 1 , because the only solution with A = 1 , which is A = 1 , ε = 5 , is not valid since 1 × 4 + 5 × 3 6 = 1 8 4 = 1 3 8 . Therefore, A = 0 .
Knowing this, and applying the same modulo- 2 3 arithmetic, it can be shown that the only valid solution is β = 1 , γ = 2 , δ = 1 , ε = 2 , which corresponds to
A = 0 , B = 2 , C = 4 , D = 6 , E = 1 2 , F = 8
and yields the correct answer:
1 × 0 + 2 × 2 + 3 × 4 + 4 × 6 + 5 × 1 2 + 6 × 8 = 1 4 8 .
Therefore, the solution of the Mystic Circle is unique.
Python solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Going with compulsory pairs (numbers that could only form squares in two ways, either directly or after some numbers had been eliminated) I got to part rings 1-8-28-21 + 5-31-18-7-29-20-16-9-27-22 + 6-30-19-17-32-4 + 10-26-23-2-14 + 11-25-24 + 3-13-12. At this point I was stuck a bit, but 15 gave me the next step: It can be coupled with 1, 10 and 21, but 1 and 21 are at 2 ends of the same part ring, so we cannot couple it with both of these, which means it must be coupled with 10. After this, the numbers all fell into 3 part-rings, from which the full ring was easily created.
Problem Loading...
Note Loading...
Set Loading...
The compulsory links -
4 − 3 2 − 1 7
5 − 3 1 − 1 8
6 − 3 0 − 1 9
7 − 2 9 − 2 0
8 − 2 8 − 2 1
9 − 2 7 − 2 2
1 0 − 2 6 − 2 3
1 1 − 2 5 − 2 4
Now 1 8 can only be linked with 7 , So we have 5 − 3 1 − 1 8 − 7 − 2 9 − 2 0 . And 2 0 can only be paired with 1 6 which can only be paired with 9 so we have 5 − 3 1 − 1 8 − 7 − 2 9 − 2 0 − 1 6 − 9 − 2 7 − 2 2
And 1 9 can only be paired with with 1 7 so we have 4 − 3 2 − 1 7 − 1 9 − 3 0 − 6
Beyond this point is case work along with logic.
5 can be paired with either 4 or 1 1 .
2 2 can be paired with 3 or 1 4
4 can be paired with 5 , 1 2 , or 2 1 .
6 can be paired with 3 or 1 0 .
Trying out all options, leads to the one unique solution above.
The number of times the squares 4 , 9 , 1 6 , 2 5 , 3 6 , 4 9 appear are 0 , 2 , 4 , 6 , 1 2 , 8 respectively. The answer is 0 + 4 + 1 2 + 2 4 + 6 0 + 4 8 = 1 4 8 .