initial answer to prime factors in ruby