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

 Expression Ratio (Posted on 2013-09-03)
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.)
 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             3993  1          5             3996  3          15            1339  3          15            13314  7         35            5721  7         35            5738  19        95            2142  21        105           1957  19        95            2163  21        105           19114  57       285           7171  57       285           7266  133      665           3399  133      665           3798  399      1995          11197  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

 Search: Search body:
Forums (0)