If N is a nonnegative integer, the triangular number T(N)=1+2+3+...+N is given by N(N+1)/2.
Find a prime P such that the sum of the proper divisors of T(P) is a cube.
clearvars
p=0;
for i=1:10000
p=nextprime(p+1);
tri=t(p);
sd=sum(divisors(tri))-tri;
cr=round(sd^(1/3));
if cr^3==sd
disp(p)
end
end
function tn=t(N)
tn=N*(N+1)/2;
end
finds only
2
53
The 2nd triangular number is 3, whose only proper divisor is 1, which is 1^3.
The 53rd triangular number is 1431m whose proper divisors are 1, 3, 9, 27, 53, 159, and 477, whose sum is 729, which is 9^3.
|
Posted by Charlie
on 2023-12-29 08:56:36 |