This is one possible solving path. Since the clues are of the form (2p + 1)2 + (2q + 1)2 + (2r + 1)2 = 16s + 3, all four terms are odd, which allows many grid cells to be identified as odd digits (shaded orange here). Also, for A − B (clue I) and F − e (clue IV) to be odd, A and F must be even (their last digits shaded blue). As s in the equations is a triangular number, for every clue the (sum − 3)/16 must be triangular (and an integer).
The squares of odd numbers ending in {1, 3, 5, 7, 9} end in {1, 9, 5, 9, 1} respectively. In clue VII the sum 2[k]63 ends in 3, so the three square terms must end in either (1, 1, 1) or (5, 9, 9) in some order. For (1, 1, 1), all of {n, m, K} must end in 1 or 9; m and K share the same first digit and the clue tells us m < K, so they would be _1 and _9 respectively, making n either 91 or 99, but then n < m is impossible. So the squares end in (5, 9, 9), one of {n, m, K} ends in 5 and each of the other two ends in 3 or 7. If n is _5 then m is _3 and K is _7, making n = 75, which in turn pushes m and K up to {83, 87} or {93, 97}; but 752 + 832 + 872 = 20083 and 752 + 932 + 972 = 23683, neither of which matches the clue’s sum of 2__63, so n doesn’t end in 5. If K ends in 5 then n is one of {53, 57} and for n < m < K we need m = K − 2 to be one of {63, 73, 83, 93}; choosing maximum values, the equation is 572 + 932 + 952 = 20923, but to contain k the sum must be ≥ 21163. Therefore m ends in 5, K = m + 2 (to end in 7) and n is one of {73, 77}. Of the combinations {732 + 752 + 772 = 16883, 732 + 852 + 872 = 20123, 732 + 952 + 972 = 23763, 772 + 852 + 872 = 20723, 772 + 952 + 972 = 24363}, the only sums ≥ 21163 are with m = 95 and K = 97, namely {23763, 24363}. We need the sum to match 16s + 3, ie having a remainder of 3 when divided by 16; 24363 = 16×1522 + 11 doesn’t work, so we’re left with 23763 = 16×1485 + 3, making n = 73 and k = 37.
In clue VIII we now have N = _5, starting with an odd digit, and N < 37, so it’s one of {15, 35}. H starts with 3, so for clue II the sum is at least 3003, but if N is 15 then the maximum sum possible is 112 + 132 + 152 = 515, too small; therefore N = 35 and for clue VIII we have 2594 + h2 = 4[G]. L is _7, so it’s one of {17, 57, 77}, as 37 and 97 are already used, which makes h > 37 end in one of {1, 5, 7}. The maximum for h is √(4999 − 2594) ≈ 49.04, so h is one of {41, 45, 47}. The corresponding sums for clue VIII are {4275, 4619, 4803} and the values for (sum − 3)/16 are {267, 288.5, 300}. Testing for triangularity, √(2×267) ≈ 23.1, but the 23rd triangular number is 23×24/2 = 276; the only triangular option is 300 = 24×25/2, so the sum is 4803, G = 803 and h = 47, making L = 77.
In clue VI, the middle term needs F − 73 ≤ 75, so F ≤ 148 and the sum is in the range [10051, 14851]. For clue V we need b < D < a; b and D share the same last digit, so b ≤ D − 10; D’s (odd) first digit is a’s second, so the digits of a can’t be in ascending order. The sum d is ≥ 11001 (from the grid), but if a starts with 6 or lower, the maximum is 492 + 592 + 652 = 10107, too small. Omitting values already used, a is one of {75, 83, 85, 87, 93, 99} and the maximum for the sum d is 832 + 932 + 992 = 25339 (D can’t be 95 or 97, which are already used). That means B starts with 1 or 2. If it’s 19 then the maximum for clue II is 192 + 332 + 352 = 2675, but we need it to be ≥ 3003; therefore B and d start with 2, and M is in the range [23, 33]. If a < 90 then the maximum sum for clue V is 692 + 792 + 872 = 18571, too small for d, so a starts with 9; it can’t be 91 because D’s first digit is at least 3 (so that b can be smaller). If a is 93 then the maximum sum is 292 + 392 + 932 = 11011, too small; that only leaves a = 99, making D one of {91, 93}.
If D and b end with 1 then the sum d ends with 3; if they end in 3 then d ends in 9; that limits M to one of {23, 29, 33}. If M is 29 then the maximum for clue II is 272 + 292 + 352 = 2795, too small. Therefore M = 33 and d ends in 3, so D = 91. The minimum for B is now √(3003 − 332 − 352) ≈ 26.2, so B is one of {27, 29}, giving corresponding sums of {3043, 3155} and (sum − 3)/16 values in {190, 197}. Testing for triangularity, √(2×197) ≈ 19.8, so we want the 19th triangular number, 19×20/2 = 190, the other one, so [H]3 = 3043, H = 304 and B = 27.
In the grid, d = 2__43 and is in the range [21043, 29943], with its associated triangular number t = (d − 3)/16 between 1315 and 1871.25, with a triangular root in the range [51, 61]. But t ends in 0 or 5 and 2t = n(n + 1) ends in 0, so the root n must end in one of {4, 5, 9, 0}, restricting the roots to {54, 55, 59, 60}. The corresponding values for t are {1485, 1540, 1770, 1830}, making d one of {23763, 24643, 28323, 29283} and the only one that fits the grid is d = 24643, with b = 81.
For clue III, e2 + C2 + f2 = 14[E], E is now in the range [411, 499], giving limits for the sum of 14411 and 14499. The associated triangular number is between 900.5 and 906; √(2×901) ≈ 42.4 and √(2×906) ≈ 42.6, so the triangular has to be 42, giving the triangular number 903 and the sum of 14451, which makes E = 451 and e ends in 1. To give a sum ending in 1, the three squares must end in either (1, 1, 9) or (1, 5, 5), and we already know e2 ends in 1. If the other two squares both end in 5 then C and f also end in 5, ie f is 55; but then the maximum sum would be 412 + 452 + 552 = 6731, too small. So either C2 or f2 ends in 1 and the other ends in 9; that is, either C or f ends in 1 or 9 and the other ends in 3 or 7. C can’t end in 1 (because C > e), so f is one of {31, 39, 71, 79, 93} (not 97, already used). If f is 71, the maximum sum is 612 + 672 + 712 = 13251, too small. If f is 93 then C ending in 9 is e + 8, giving e2 + (e + 8)2 + 932 = 14451, ie e2 + 8e − 2869 = 0, for which the quadratic formula gives the roots {49.7, -57.7} (approximately), not integers. What’s left is f = 79, and the quadratic equation e2 + (e + 6)2 + 792 = 14451 has roots {61, -67}, so e = 61 and C = 67.
For clue I we now have (A − 27)2 + 772 + 832 = 158_3, so (A − 27) is between √(15803 − 12818) ≈ 54.6 and √(15893 − 12818) ≈ 55.5, so A − 27 = 55, ie A = 82, the sum is 15843 and g = 5843. For clue VI we have 592 + (F − 73)2 + 772 = [F]51. As the sum ends in 1, the three squares must end in (1, 1, 9) or (1, 5, 5), but we know the first and third ones end in 1 and 9 respectively, so (F − 73)2 must end in 1, with (F − 73) ending in 1 or 9; the possibilities between 59 and 77 are {61, 69, 71}, giving F as one of {134, 142, 144} and the corresponding sum in {13131, 14171, 14451}. The only one that matches the grid entry is 14451 with F = 144. Clue IV now becomes 672 + 832 + 952 = 20403, so c = 2040 and the grid is full. The eight equations we have are:
552 + 772 + 832 = 15843 272 + 332 + 352 = 3043 612 + 672 + 792 = 14451 672 + 832 + 952 = 20403 812 + 912 + 992 = 24643 592 + 712 + 772 = 14451 732 + 952 + 972 = 23763 352 + 372 + 472 = 4803
For each equation’s square roots (2p + 1), (2q + 1) and (2r + 1), each of the triangular numbers t = p(p + 1)/2, u = q(q + 1)/2, v = r(r + 1)/2 is the sum of a pair of numbers in a thematic triple (a, b, c), let’s say t = a + b, u = a + c, v = b + c. Substituting c = v − b into the second equation gives u = a + v − b, then substituting b = a + v − u into the first one gives t = 2a + v − u, ie a = (t + u − v)/2. Then we can get b = t − a and c = v − b.
For example, in clue I we have p = (55 − 1)/2 = 27, q = (77 − 1)/2 = 38 and r = (83 − 1)/2 = 41 for the roots of the triangular numbers {27×28/2 = 378, 38×39/2 = 741, 41×42/2 = 861}, from which we can derive the thematic triple {a = (378 + 741 − 861)/2 = 129, b = 378 − 129 = 249, c = 861 − 249 = 612}. As a check, the sum of all three is 129 + 249 + 612 = 990 = 44×45/2, a triangular number. The full set of triangular numbers derived from the clues and their associated thematic triples is:
{378, 741, 861} → {129, 249, 612} {91, 136, 153} → {37, 54, 99} {465, 561, 780} → {123, 342, 438} {561, 861, 1128} → {147, 414, 714} {820, 1035, 1225} → {315, 505, 720} {435, 630, 741} → {162, 273, 468} {666, 1128, 1176} → {309, 357, 819} {153, 171, 276} → {24, 129, 147}
The numbers that appear more than once are 129 and 147; their sum is 276 = 23×24/2, the 23rd triangular number. (Adding both occurrences of each of them would give 552, but that doesn’t have the thematic property of being triangular.)