much faster solution to 41 by generating pandigitals first then checking prime in ruby