I don't need the answer. I just need to understand the question. I thought distinct would mean all the factors are different, but 644 and 646 have 2 as a common factor.
This is a programming question on the site Project Euler, in case someone is interested.
Problem #47 to be exact.
Copyright © 2024 1QUIZZ.COM - All rights reserved.
Answers & Comments
Verified answer
I think it means that the factors are distinct within each number.
644 = 2^2 * 7 * 23
That's three distinct prime factors: 2, 7, 23
No need to compare this to 646, or any other number.
"Non-distinct" would be the repeated 2. It counts as only one distinct factor.
You are looking for 4 consecutive numbers with 4 different
prime factors and no more ( not 5 or not 3)
for example 2*2*2*3*3* 5*17 = 6210
2 , 3, 5, and 17 are four different prime factors
I get these
134043 134044 134045 134046
via Matlab routine
(134043 - Factors 3 7 13 491 )
134044 - Factors 2 23 31 47
134045 - Factors 5 17 19 83
134046 - Factor 2 3 11 677
so the 1st number is 134043
four different prime numbers.