Determine all possible values of a
nonnegative integer n such that;
• 2n-1*n +1 is a perfect square.
Note: Adapted from a problem which appeared in a Georgia IMO.
digits 300
clearvars,clc
for n=vpa(0):450
v=2^(n-1)*n+1;
sr=round(sqrt(v));
if sr*sr==v
disp([n v sr])
end
end
finds only
[0, 1, 1]
[5.0, 81.0, 9]
for the [n, formula value, square root].
|
Posted by Charlie
on 2023-07-02 10:09:16 |