since n^2-1 = (n-1)(n+1) we are looking for twin primes
Just look up a list of twin primes, and sum their average (since you want the even number n between n-1 and n+1)
What is the sum of all integer values of n satisfying 1 \leq n \leq 100, such that n^2 - 1 is a product of exactly two distinct prime numbers?
1 answer