Square my chunks and add
The idea is to transform the integer a into b and iterate. Cut a into the number of chunks you want, square them, add those squares. Example a = 1023 can be transformed in b (last column) like this: 1 ² + 0 ² + 2 ² + 3 ² = 1 + 0 + 4 + 9 = 14 = b 1 ² + 0 ² + 23 ² = 1 + 0 + 529 = 530 10 ² + 2 ² + 3 ² = 100 + 4 + 9 = 113 10 ² + 23 ² = 100 + 529 = 629 102 ² + 3 ² = 10404 + 9 = 10413 1023 ² = 1046529 Question #1 Starting with 2 and iterating, what is the shortest path ending in 1? Here are 11 steps (left column) – can you do better? 2 –> 2² = 4 4 –> 4² = 16 16 –> 1² + 6² = 1 + 36 = 37 37 –> 37² = 1369...