For a = 1 To 70
For b = a To 70
For c = b To 70
tot = a * a + b * b + c * c
ct0 = ct0 + 1
If tot Mod 28 = 0 Then
If a = b Or b = c Or a = c Then
Text1.Text = Text1.Text & a & Str(b) & Str(c) & Str(tot) & crlf
End If
ct = ct + 1
DoEvents
End If
Next
Next
Next
finds that there are 1035 sets that meet the divisible by 28 criterion among all 59,640 sets meeting the order criterion equal to or under 70.
I note the previously quoted answer of 1010 would be valid if equality were not allowed among a, b and c. However the inequality symbols also show that equality is allowed. The following 25 triplets are the ones where two or three are equal:
a b c a^2 + b^2 + c^2
14 14 14 588
14 14 28 1176
14 14 42 2156
14 14 56 3528
14 14 70 5292
14 28 28 1764
14 42 42 3724
14 56 56 6468
14 70 70 9996
28 28 28 2352
28 28 42 3332
28 28 56 4704
28 28 70 6468
28 42 42 4312
28 56 56 7056
28 70 70 10584
42 42 42 5292
42 42 56 6664
42 42 70 8428
42 56 56 8036
42 70 70 11564
56 56 56 9408
56 56 70 11172
56 70 70 12936
70 70 70 14700
stats:
1035 59640
Edited on December 21, 2014, 9:09 pm

Posted by Charlie
on 20141221 21:08:21 