for tot=2:100000
for x=1:tot-1
y=tot-x;
if x^2-y^2==2026-2*(x+2*y)
disp([x,y])
factor(x)
factor(y)
disp(' ')
end
end
end
finds
>> nonPrimeIntegerInquiry
67 53
ans =
67
ans =
53
147 143
ans =
3 7 7
ans =
11 13
1011 1013
ans =
3 337
ans =
1013
(67, 53) satisfy the equation but both are prime.
(1011, 1013) satisfy the equation, but the latter, y = 1013, is prime.
x = 147, y = 143 satisfy the equation and neither is prime, as
147 = 3*7^2 and 143 = 11*13
The answer is thus 147*143 = 21021.
|
Posted by Charlie
on 2024-02-29 08:13:23 |