Are there squares S = n
2 such that when you add S and its digits the result is also a square?
For example, if S were 25 then 25+2+5 would also have to be a square.
If so, give an example.
If not, prove it.
for n=1:100
ns=num2str(n^2);
s=str2double(ns)+sod(ns);
sr=round(sqrt(s));
if sr^2==s
disp([n s sr])
end
end
finds no such case below 100.
Above 100, the difference between successive squares is much larger than could be achieved by the sum of digits. For example, 101^2 - 100^2 = 201, while 101^2 is only 10201, a 5-digit number, which can't possibly exceed a sod of 45.
|
Posted by Charlie
on 2024-03-12 12:18:46 |