Determine all possible positive integers m such that:
√(4m - 7)
...........
√(m + 1)
is a rational number.
Provide adequate reasoning for your answer.
The only value I found was m = 8,
with the ratio being sqrt(25)/sqrt(9) or 5/3
def isSquare(n):
""" Input an integer, Returns True iff it is a perfect square. """
if round(n**0.5)**2 == n:
return True
else:
return False
big = 1000000
for m in range(2,big):
num = (4*m - 7)**.5
den = (m + 1)**.5
if isSquare(4*m - 7) and isSquare(m + 1):
print(m, int(num) , int(den))
|
Posted by Larry
on 2023-02-22 12:58:10 |