prime factors ruby