Testing for n up to 10^6, I found the same 2 solutions as Charlie.
n f(n)
3 72 = 8*9
5 600 = 24*25
-----------
def f(n):
return n**4 - 8*n + 15
big = 1000000
conprods = [k*(k+1) for k in range(big)]
for n in range(big):
if f(n) > conprods[-1]:
print('too big', conprods[-1],n, f(n))
break
if f(n) in conprods:
print(n, f(n), int(f(n)**.5))
|
Posted by Larry
on 2024-09-11 11:23:08 |