Largest prime factor with limited prime array