12
$\begingroup$

In this image from a numberphile video we see a sequence of numbers from 1 to 15 without repeats where any pair of neighbouring digits sum together to make a perfect square number.

15 is the lowest value where this can be made to work. Adding 16 to the end also works but 1 to 15 is the smallest.

enter image description here

Question
Is it possible to arrange the digits from 1 to n where the sum of any 3 digits along the line is always a perfect square and what is the lowest value of n if it is possible?

Example Start
1 3 5 8 12 16 11 9.
Here we have 11 + 9 is 20 we can't use 16 again to get to 36 so the only option would be 29 to get to 49.
1 3 5 8 12 16 11 9 29 26 9 14 2 20 27 17 20
And so on the highest value in the above sequence is 29 but the next value has to be 44 meaning that all the digits below 44 must appear in the rest of the sequence somewhere.
Will the sequence always require a higher value making a consecutive sequence of numbers impossible?

$\endgroup$
2
  • $\begingroup$ $12+16+11=39$ is not a square. $\endgroup$
    – RobPratt
    Mar 9 at 22:22
  • $\begingroup$ Oops nice catch $\endgroup$
    – Maff
    Mar 10 at 2:15

1 Answer 1

9
$\begingroup$

An exhaustive search has found that the lowest value of n for which this is possible is:

n = 64

With the sequence:

39 45 16 20 28 52 41 51 29 64 7 10 47 43 54 24 22 18 60 3 1 5 19 25 37 59 48 62 11 8 17 56 27 61 33 50 38 12 31 6 44 14 23 63 35 46 40 58 2 4 30 15 36 13 32 55 57 9 34 21 26 53 42 49

$\endgroup$
1
  • $\begingroup$ If allowing the end of the sequence to loop around and connect to the first digit. Would n still = 64 or could it be lower or would it be higher? $\endgroup$
    – Maff
    Feb 28 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.