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

Home > Just Math
Yearly Diophantine Puzzle (Posted on 2015-06-12) Difficulty: 3 of 5
Each of A and B (with A ≤ B) is a divisor of 2016.
For how many pairs (A, B) do A2 + B2 equal a perfect square?

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
The 24 sets of A, B and C where A^2 + B^2 = C^2:

3 4 5
6 8 10
7 24 25
9 12 15
12 16 20
14 48 50
16 63 65
18 24 30
21 28 35
21 72 75
24 32 40
28 96 100
32 126 130
36 48 60
42 56 70
42 144 150
63 84 105
72 96 120
84 112 140
84 288 300
126 168 210
168 224 280
252 336 420
504 672 840

DefDbl A-Z
Dim crlf$

Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 For a = 1 To 2016
   If 2016 Mod a = 0 Then
     For b = a To 2016
       If 2016 Mod b = 0 Then
         c2 = a * a + b * b
         c = Int(Sqr(c2) + 0.5)
         If c * c = c2 Then
           Text1.Text = Text1.Text & a & Str(b) & Str(c) & crlf
           ct = ct + 1
         End If
       End If
     Next b
   End If
 Next a

 
 Text1.Text = Text1.Text & ct & crlf & " done"
  
End Sub


  Posted by Charlie on 2015-06-12 15:23:04
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 (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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