Perfect numbers: Difference between revisions

Content added Content deleted
Line 948: Line 948:
while k < quot && total <= n
while k < quot && total <= n
if ~mod(n, k)
if ~mod(n, k)
total = total+k;
quot = n/k;
quot = n/k;
total = total+k+quot;
if quot ~= k
total = total+quot;
end
end
end
k = k+1;
k = k+1;