The distinct prime divisors of the first product are the same as if the numbers were not squared, as we seek "distinct". It is obviously all the primes below 900, of which there are 154.
The second is trickier:
(n-1)^2 = n^2 - 2*n + 1, so
n^2 - 1 = (n-1)^2 + 2n - 2
I don't know why it should have the same set of prime divisors as the first, but it does:
clearvars
pdivs=[];
for n=200:900
f=factor(n);
pdivs=union(pdivs,f);
end
disp(length(pdivs))
pdivs2=[];
for n=200:900
f=factor(n^2-1);
pdivs2=union(pdivs2,f);
end
disp(length(pdivs2))
finds that each has 154 prime factors so the ratio is 154/154 = 1.
|
Posted by Charlie
on 2023-07-21 12:57:40 |