11 primes
= Primes
.instance
18 # puts "trying factor #{primes[prime_index]} with quotient #{quotient}"
19 if (quotient
% primes
[prime_index
]) == 0
20 prime_factors
<< primes
[prime_index
]
21 quotient
= quotient
.div primes
[prime_index
]
28 puts
"Prime factors of #{$TARGET} are #{prime_factors.join(', ')}; largest is #{prime_factors.max}"