- 42,946
- 10,550
Yes, I worried I was missing something there, but didn't see it. So there's a penalty as you step down down the sequence from n. If the second factor, g, is from n-1 then the terms it won't divide occur in pairs, k=g, k=g+1; if from n-2 then they occur in triples, etc. Consequently, it might not be best to take the largest prime power factor from n that you can. Ouch.PeroK said:Actually, this is not quite right. If the primes are picked from different integers, then their factorisation sequences are not in sync. E.g. if p = 5 is a factor of n and p = 7 is a factor of n-1, then they both cancel when k = 15 (not 35). And p = 25 and q = 49 would cancel at k = 50.
Very tricky!