Project Euler #146: Investigating a Prime Pattern

  • + 0 comments

    Problem can be solved using quadratic congruence solver. We can check for prime p which values greater than p such n^2 + a are divisible by prime p. In this way we greatly reduce search space by obtaining exluded values for given number % prime. Primes up to 97 is sufficient.