Let
S(3)= 13+23+…+(2n)3
and
S(2)= 12+22+…+n2
For what integer values of n will the ratio r=S(3)/S(2) have an integer result?
List all existing answers.
Source: Russian Math Olympiad
(In reply to
computer confirmation by Larry)
clearvars , clc
s3=sym(0); s2=sym(0);
for n=1:9999999
s3term=sym(2*n-1)^3+sym(2*n)^3; s2term=sym(n)^2;
s3=s3+s3term; s2=s2+s2term;
if s3/s2==round(s3/s2)
disp([n s3 s2 s3/s2])
end
end
finds
[1, 9, 1, 9]
[2, 100, 5, 20]
[5, 3025, 55, 55]
showing n, s3, s2, s3/s2 for each.
It was actually stopped around n = 20,000.
|
Posted by Charlie
on 2022-05-19 10:21:07 |