For each k, e.g. k = 200, 201 etc you're adding
k to the list of prime factors,
if k is prime. The distinct prime factors of k are identical to the prime factors of k^2.
For any prime under 200, several multiples of said prime appears in the list 200 ... 900.
Then for k^2 - 1, you're doing the same thing for (k-1) and (k+1).
So every number from 200 to 900 inclusive was assessed for each function.
However 199 and 901 were assessed only for the second function. So the prime 199 might not be in the first list; except that 199*2 = 398 and we already claimed that for any prime under 200, several multiples of said prime appears in the list 200 ... 900.
What about 901? 901 is not prime.
In fact 901=17*53 and for all primes under 200, ... see above.
m = n = 154 ; m/n = 1
primes= [i for i in range(901) if isprime(i)]
print(len(primes))
154
|
Posted by Larry
on 2023-07-21 12:55:44 |