Project Euler #118: Pandigital prime sets

Sort by

recency

|

3 Discussions

|

  • + 0 comments

    Maintain a boolean array for very fast primality check sieving for n <= 10^k, then use a fast primality test (e.g.: Miller-Rabin) for n > 10^k. My code passes all tests sieving for either 10^6, 10^7 and 10^8.

    If you are already doing that, you need to optimize somewhere else :)

  • + 0 comments

    Note: there are a few sets producing the same sum, e.g. for 1235679 you get 5+13+29+67 = 5+19+23+67 = 114.

  • + 0 comments

    Would you brute force, then test?

No more comments