Solution:
If x≤106, then 2x2−1<2⋅1012. The density of prime numbers up to 2⋅1012 is roughly
ln(2⋅1012)−11≈0.0366
However, 2x2−1 can never be divisible by 2, 3, or 5. Only 21⋅32⋅54=154 of numbers are not divisible by 2, 3, or 5, including all of the primes, so the density of primes among such numbers is a factor of 415 higher. Among the 106 possible values of x, we get an estimate of
415⋅0.0366⋅106=137250
To refine this estimate further, observe that the values of 2x2−1 are not uniformly distributed from 1 to 2⋅1012. Their average is very close to 32⋅1012, so as a crude estimate, we can take the density of prime numbers up to 34⋅1012 instead:
ln(34⋅1012)−11≈0.03715
This gives us an estimate of
415⋅0.03715⋅106≈139313
Using sage, one can easily obtain the exact answer by the following code.
```
cnt = 0
for x in range(1, 10^6+1):
if is_prime(2*x^2-1):
cnt += 1
print(cnt)
```