Table of pairs whose sum is one of the given square numbers
The following table lists all 93 pairs which can be formed with the numbers from 1 to 60 whose sum is an element of the set {9, 36, 49, 64, 81}:
- The first column lists the numbers i from 1 to 60.
- The second column lists all the numbers greater than i with which i can be paired. That’s the column used by the first (slow) version of the python program.
- The third column lists all the numbers smaller than i with which i can be paired. That’s the column used by the second (backward) version of the python program.
- The fourth column lists all the numbers with which i can be paired, smaller or greater. That’s the column used by the third (fast forward) version of the python program.
i | higher pairs | lower pairs | all pairs |
---|---|---|---|
1 | 8, 35, 48 | 8, 35, 48 | |
2 | 7, 34, 47 | 7, 34, 47 | |
3 | 6, 33, 46 | 6, 33, 46 | |
4 | 5, 32, 45, 60 | 5, 32, 45, 60 | |
5 | 31, 44, 59 | 4 | 4, 31, 44, 59 |
6 | 30, 43, 58 | 3 | 3, 30, 43, 58 |
7 | 29, 42, 57 | 2 | 2, 29, 42, 57 |
8 | 28, 41, 56 | 1 | 1, 28, 41, 56 |
9 | 27, 40, 55 | 27, 40, 55 | |
10 | 26, 39, 54 | 26, 39, 54 | |
11 | 25, 38, 53 | 25, 38, 53 | |
12 | 24, 37, 52 | 24, 37, 52 | |
13 | 23, 36, 51 | 23, 36, 51 | |
14 | 22, 35, 50 | 22, 35, 50 | |
15 | 21, 34, 49 | 21, 34, 49 | |
16 | 20, 33, 48 | 20, 33, 48 | |
17 | 19, 32, 47 | 19, 32, 47 | |
18 | 31, 46 | 31, 46 | |
19 | 30, 45 | 17 | 17, 30, 45 |
20 | 29, 44 | 16 | 16, 29, 44 |
21 | 28, 43, 60 | 15 | 15, 28, 43, 60 |
22 | 27, 42, 59 | 14 | 14, 27, 42, 59 |
23 | 26, 41, 58 | 13 | 13, 26, 41, 58 |
24 | 25, 40, 57 | 12 | 12, 25, 40, 57 |
25 | 39, 56 | 24, 11 | 11, 24, 39, 56 |
26 | 38, 55 | 23, 10 | 10, 23, 38, 55 |
27 | 37, 54 | 22, 9 | 9, 22, 37, 54 |
28 | 36, 53 | 21, 8 | 8, 21, 36, 53 |
29 | 35, 52 | 20, 7 | 7, 20, 35, 52 |
30 | 34, 51 | 19, 6 | 6, 19, 34, 51 |
31 | 33, 50 | 18, 5 | 5, 18, 33, 50 |
32 | 49 | 17, 4 | 4, 17, 49 |
33 | 48 | 31, 16, 3 | 3, 16, 31, 48 |
34 | 47 | 30, 15, 2 | 2, 15, 30, 47 |
35 | 46 | 29, 14, 1 | 1, 14, 29, 46 |
36 | 45 | 28, 13 | 13, 28, 45 |
37 | 44 | 27, 12 | 12, 27, 44 |
38 | 43 | 26, 11 | 11, 26, 43 |
39 | 42 | 25, 10 | 10, 25, 42 |
40 | 41 | 24, 9 | 9, 24, 41 |
41 | 40, 23, 8 | 8, 23, 40 | |
42 | 39, 22, 7 | 7, 22, 39 | |
43 | 38, 21, 6 | 6, 21, 38 | |
44 | 37, 20, 5 | 5, 20, 37 | |
45 | 36, 19, 4 | 4, 19, 36 | |
46 | 35, 18, 3 | 3, 18, 35 | |
47 | 34, 17, 2 | 2, 17, 34 | |
48 | 33, 16, 1 | 1, 16, 33 | |
49 | 32, 15 | 15, 32 | |
50 | 31, 14 | 14, 31 | |
51 | 30, 13 | 13, 30 | |
52 | 29, 12 | 12, 29 | |
53 | 28, 11 | 11, 28 | |
54 | 27, 10 | 10, 27 | |
55 | 26, 9 | 9, 26 | |
56 | 25, 8 | 8, 25 | |
57 | 24, 7 | 7, 24 | |
58 | 23, 6 | 6, 23 | |
59 | 22, 5 | 5, 22 | |
60 | 21, 4 | 4, 21 |