Determine the sum of the four smallest prime factors of:
2016239 -1
(In reply to
computer solution by Charlie)
ct=0;p=1;tot=0;
while ct<6
p=nextprime(p+1);
if powermod(2016,239,p)==1
tot=tot+p;
ct=ct+1;
fprintf('%1d %5d %5d\n',[ct p tot])
end
end
produces the same output
1 5 5
2 13 18
3 31 49
4 479 528
5 1913 2441
|
Posted by Charlie
on 2023-06-14 22:15:31 |