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

Home > Just Math
Divisible by 28 (Posted on 2014-12-21) Difficulty: 3 of 5
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.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution 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 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 2014-12-21 21:08:21

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information