Determine all possible triplets (x,y,n) of positive integers, with n>1, that satisfy this equation:
xn - yn = 2015
clearvars,clc
for n=2:25
for y=1:100000
x=(y^n+2015)^(1/n);
if abs(x-round(x))<.0000000000001
if x^n-y^n==2015
disp([x y n]);
end
end
end
end
finds only
x y n
48 17 2
84 71 2
204 199 2
1008 1007 2
|
Posted by Charlie
on 2022-12-18 10:28:52 |