Apologies for not posting the solution last week, was traveling out of town on vacation. Also need to thank everyone for a “bumper response” to the puzzle. I got more answers to this puzzle than any other puzzle in the recent past. What was heartening to see was that many children responded to the puzzle.
I got correct answers for the smaller version (i.e. until 17) from Muskaan Mittal and Anisha Goyal. For the longer version I got correct answers from Smiti Mittal, Andy De, Jeba, Anirudh Baddepudi and Radhika Goyal. Anirudh and Radhika were the only ones though he sent a generic solution, and one that is very easily doable. Congrats Anirudh and Radhika!
While there are many versions of the brute force method, the best way to think about the puzzle is the following:
– odd and even numbers have to alternate for obvious reasons
– 71 and 73 are both prime numbers
– Divide the numbers into two sequences… (2,4,6,…,70) and (71, 69, 67, ….,1)
Interleave the two in the following way:
71, 2, 69, 4, 67, 6, 65, 8, ……, 70, 1
You will notice that all additions of adjacent numbers in this sequence add up to 71 and 73. The method can be applied to any sequence ending in number “n” where “n” and “n+2” are primes. So we can do the same for sequence up to 29 fore example as well.
Hope you enjoyed the puzzle!