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

Home > Just Math
Expression Ratio (Posted on 2013-09-03) Difficulty: 4 of 5
Determine all pairs (a,b) of positive integers with a > b, for which (a2+b2)/(a-b) is an integer which divides 1995.

Prove that there are no others.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution No Subject | Comment 1 of 4

DEFDBL A-Z
FOR a = 2 TO 2000
FOR b = 1 TO a - 1
  num = a * a + b * b
  den = a - b
  IF num MOD den = 0 THEN
    q = num / den
    IF 1995 MOD q = 0 THEN
       PRINT a; b, q, 1995 / q
    END IF
  END IF
NEXT
NEXT

finds

a  b        ratio         1995/ratio 
2  1          5             399
3  1          5             399
6  3          15            133
9  3          15            133
14  7         35            57
21  7         35            57
38  19        95            21
42  21        105           19
57  19        95            21
63  21        105           19
114  57       285           7
171  57       285           7
266  133      665           3
399  133      665           3
798  399      1995          1
1197  399     1995          1

As a is tried for all integers to 2000, and b up to 1 less than a, any obtainable number of 1995 or less will be tested.


  Posted by Charlie on 2013-09-03 19:51:38
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 (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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