A fun maths puzzle to keep you busy

Take the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 and reorder them so that each number is next to another that, when added together, create a square number. IE, 1, 3 because 1+3 is 4 which is 2^2

You can only use each number once.
Sure:
My backwards logic says that 10 is not a single number, but a multiple of 1 and 0. Thus 21 is actually 2+1. This means that you really said, "if you add everything together do you get a squared number?" The answer is yes!

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 + 0 + 1 + 1 + 1 + 2 + 1 + 3 + 1 +4 + 1 + 5 + 1 + 6 + 1 + 7 + 1 + 8 + 1 + 9 + 2 + 0 + 2 + 1 + 2 + 2
= 108

1 + 0 + 8 = 9

9 is 3^2
That's certainly one way to putting it, but no, I meant to rearrange the numbers from 1 to 22 in such a way that each of them is next to another number that creates a square number, so instead of: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, I'll give an example.

Lets say you start the new series off with a 1. you could put 1, 3, 22, because 1+3 = 4 (or 2^2) and 3+22 = 25 (or 5^2), OR you could do 1, 8, 17, because 1+ 8 = 9 (or 3^2) and 8+17 = 25 (or 5^2)

You have to reorder the numbers in such a way that each number to the right adds up to a square number with the number preceding it. There's only one way to rearrange all the numbers so it works. 10, 6, 3, 13, 12, 4, etc etc etc until all the numbers are used. (And the example I just used is wrong, if you start off with 10 the problem breaks down and it can't be completed)

And here's a little more help, all the relevant square numbers are 4, 9, 16, 25, 36, and 49(maybe), if two numbers don't add up to one of those then they can't work next to each other.
Omigosh, this forums actually saves my unposted comments 😛

edit: Whoops, wait a sec, I'm not done yet but I accidentally hit enter XD

Spoiler
1 15
2 14
3 13
4 12
5 11
6 10
18 7 9
8 17

18 7 (9...)
(...3 1)8 17 19 6 (10...)
9 16 20 5 (11...)
(...6)10 15 21 4
(...5) 11 14 22 3 (1 8...)

2 12 13

18 7 9 16 20 5 11 14 22 3 1 8 17 19 6 10 15 21 4 (12 13)

18 7 9 16 20 5
4
12 13 3
21 15
11
14

Yeah, nevermind 😛 You make the list of numbers into a graph where every number is a vertex and two vertices are adjacent if and only if they add up to a square, and plug it into a Hamiltonian path algorithm which apparently exist but is really inefficient for gianormous graphs 😛 A solution (or a way to prove it doesn't exist) exists :] *goes back to bed while everything burns down*
I was having a bit of fun with it, but okay 22 + 14 = 36; (6^2), but the way I put up first was to have fun with the numbers. Example: 9 * (any number not 0) = 9, when you add the digits of the resulting number. (This was how I taught my kids how to have fun with numbers. F.Ex, 9*3 = 27; 2+7=9. Or, 9 * 63 = 387, 3+8+7=18=1+8=9)
I suppose I can't scold you too much for having fun with it, since I had fun with it when I posed the question. I'm too giddy about my deception to contain it, the fact of the matter is the question is broken in its current form. It's impossible to solve the way I posed the question, there's a number missing, so I can't wag my finger at you since the problem can only be solved if you ignore the "rules" of the problem in the first place.

There's an interesting property about the number 9, it doesn't matter how large the number is or what you do to get to it, you could do something like 9^3(53-28)/15 = 1215 or 1+2+1+5 = 9
I was having a bit of fun with it, but okay 22 + 14 = 36; (6^2), but the way I put up first was to have fun with the numbers. Example: 9 * (any number not 0) = 9, when you add the digits of the resulting number. (This was how I taught my kids how to have fun with numbers. F.Ex, 9*3 = 27; 2+7=9. Or, 9 * 63 = 387, 3+8+7=18=1+8=9)

Ooooooh does it work for any number n in base n+1?
No, it only works with the number 9. Another interesting property of this is that you can bisect a circle infinitely many times and the angles of the wedges will always reduce to 9.

1: 360 = 3+6+0 = 9
2: 180 = 1+8+0 = 9
4: 90 = 9+0 = 9
8: 45 = 4+5 = 9
16: 22.5 = 2+2+5 = 9 and so on and so on.

The same is true for shapes. A triangle, 60+60+60 = 180 or 1+8 + 0 (or 90+45+45) or whatever shape.
For squares, the angle is 90x4
for pentagons the angle is 108 x 5 = 540
Hexagons, 120 x 6 = 720
Octagons, 135 x 8 = 1080 and so on.

1+2+3+4+5+6+7+8 = 36, 3+6 = 9

9 + n = x where the sum of the digits of x will = n

9+5 = 14,
1+4 = 5.

9+10 = 19
1+9 = 10

9+ 11 = 20
2 = 1+1

9+33 = 42
4+2 = 6
6= 3+3

9+217 = 226
2+2+6 = 10
10 = 2+1+7

Heck, lets get weird with it.
9+1337 = 1346
1+3+4+6 = 14
14 = 7 + 7
7 + 7 = (1+3+3) + 7

9 + 81724 = 81,733
8+1+7+3+3 = 22
22 = 8+1+7+2+4
Spooky, right? Vortex Theorists believe 9 is some divine code within number theory.
No, it only works with the number 9.

Actually, 9grams was asking whether it works for any number in base n+1, and yes it does.

For example, 3 * anything reduces to 3 in base 4.

3 * 1012 (base 4) = 3102 (base 4)
3 + 1 + 0 + 2 = 6 = 12 (base 4)
1 + 2 = 3

This works because you can think of multiplication as repeated addition. Returning to base 10, if you repeatedly add 9, thus: 9, 18, 27... each time you are increasing the tens and decreasing the units. So the sum of the digits always stays at 9. Similarly, in base 4, if you repeatedly add 3 then the sum of the digits will stay at 3. It's the same for any (whole-number) base.
This works because you can think of multiplication as repeated addition. Returning to base 10, if you repeatedly add 9, thus: 9, 18, 27... each time you are increasing the tens and decreasing the units. So the sum of the digits always stays at 9. Similarly, in base 4, if you repeatedly add 3 then the sum of the digits will stay at 3. It's the same for any (whole-number) base.

Nice! I guess this

9 + n = x where the sum of the digits of x will = n

9+5 = 14,
1+4 = 5.

9+10 = 19
1+9 = 10

is true for similar reasons :]

9+ 11 = 20
2 = 1+1

9+33 = 42
4+2 = 6
6= 3+3

9+217 = 226
2+2+6 = 10
10 = 2+1+7

Heck, lets get weird with it.
9+1337 = 1346
1+3+4+6 = 14
14 = 7 + 7
7 + 7 = (1+3+3) + 7

9 + 81724 = 81,733
8+1+7+3+3 = 22
22 = 8+1+7+2+4
Spooky, right? Vortex Theorists believe 9 is some divine code within number theory.

How do you know when to stop adding the digits and start decomposing the number into sums? :]
Normal people: This will be fun.
Me: I wanna make an algorithm that will solve this.
Tip: I will not though.
Normal people: This will be fun.
Me: I wanna make an algorithm that will solve this.
Tip: I will not though.
You could, probably. Graph theory might be quicker though, Ham, not Oil
The solution for the riddle I first posted is

Spoiler
18, 7, 9, 16, 20, 5, 11, 14, 2, 23, 13, 12, 4, 21, 15, 10, 6, 19, 17, 8, 1, 3, 22

18 + 7 = 25, which is 5^2
7 + 9 = 16, which is 4^2
9 + 16 = 25, which is 5^2
16 + 20 = 36, which is 6^2
20 + 5 = 25, which is 5^2
5 + 11 = 16, which is 4^2
11 + 14 = 25, which is 5^2
14 + 2 = 16, which is 4^2
2 + 23 = 25, which is 5^2
23 + 13 = 36, which is 6^2
13 + 12 = 25, which is 5^2
12 + 4 = 16, which is 4^2
4 + 21 = 25, which is 5^2
21 + 15 = 36, Which is 6^2
15 + 10 = 25, Which is 5^2
10 + 6 = 16, Which is 4^2
6 + 19 = 25, Which is 5^2
19 + 17 = 36, Which is 6^2
17 + 8 = 25, Which is 5^2
8 + 1 = 9, which is 3^2
1 + 3 = 4, which is 2^2
3 + 22 = 25, Which is 5^2

This is the ONLY way to solve the problem. I also framed the question in an impossible way which would have forced you to think intuitively and add 23, because with only 1 - 22 the problem doesn't work and there is no way to rearrange all the digits so that adding the number to the right = a square number.
It was a riddle to make you break the rules to achieve the ultimate end result.

Original thread: https://forums.rpgmakerweb.com/threads/a-fun-maths-puzzle-to-keep-you-busy.95494/