All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Divisible by 28 (Posted on 2014-12-21)
Each of a, b and c is a positive integer with a ≤ b ≤ c ≤ 70.

Find total number of triplets (a, b, c) such that a2 + b2 + c2 is divisible by 28.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 3 of 4 |
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 58814 14 28 117614 14 42 215614 14 56 352814 14 70 529214 28 28 176414 42 42 372414 56 56 646814 70 70 999628 28 28 235228 28 42 333228 28 56 470428 28 70 646828 42 42 431228 56 56 705628 70 70 1058442 42 42 529242 42 56 666442 42 70 842842 56 56 803642 70 70 1156456 56 56 940856 56 70 1117256 70 70 1293670 70 70 14700`

stats:

1035 59640

Edited on December 21, 2014, 9:09 pm
 Posted by Charlie on 2014-12-21 21:08:21

 Search: Search body:
Forums (0)