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

Home > Just Math
Making integer an expression (Posted on 2009-03-20) Difficulty: 2 of 5
Find all positive integers n which make the expression below an integer:

(25/2 + (625/4 - n) ) + (25/2 - (625/4 - n) )

See The Solution Submitted by pcbouhid    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
computer solution | Comment 5 of 12 |

QuickBasic, of course, stops as soon as it tries to take the square root of a negative number, but UBASIC takes it in stride:

list
   10     for N=1 to 10000
   20      V=sqrt(25/2+sqrt(625/4-N))+sqrt(25/2-sqrt(625/4-N))
   30      D=abs(V-int(V))
   40      if D>0.99999 or D<0.00001 then print N,V
   50     next
   60     end
OK
run
 144     7.0
 784     8.9999999999999999998
 2304    10.9999999999999999998
 5184    12.9999999999999999998
 10000   14.9999999999999999998
OK

Of course the rounding errors lead to those almost-integers that really should be integers.

In each case n is an integer and the result is an integer, so I see nothing wrong with all of them counting as solutions ad infinitum.


  Posted by Charlie on 2009-03-20 15:43:58
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 (3)
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