# Doesn't this prove that $n^2+1$ contains infinitely many primes?

The conjecture that $$n^2+1$$ contains infinitely many primes is equivalent to saying that $$(n-1)^2+1$$ contains infinitely many primes because the sequence $$n-1$$ contains all terms of the sequence $$n$$.

$$(n - 1)^2 + 1 = (n^2 - 2n + 1) + 1 = n^2 - 2n + 2 = n^2 + (-2n+2) = n * n + (-2n + 2)$$.

Dirichlet tells us that any sequence $$a + nd$$ where $$a$$ and $$d$$ are coprime contains infinitely many primes. Now, consider the fact that $$-2n + 2 = -2(n - 1)$$ for any $$n$$ and that $$n$$ is always coprime with $$n - 1$$, which means that any odd $$n$$ is coprime with $$-2(n - 1) = -2n + 2$$. Since there are infinitely many odd numbers, $$n * n + (-2n + 2)$$ contains infinitely many numbers in the form $$a + nd$$ where $$a$$ and $$d$$ are coprime, which means that $$n * n + (-2n + 2) = (n - 1)^2 + 1$$ contains infinitely many primes, implying that $$n^2+1$$ also contains infinitely many primes.

• In Dirichlet's theorem, $a,d$ are constants, they can't depend on $n$. Commented Dec 27, 2018 at 10:30
• Yes, but if they depend on $n$, it will generate $a+nd$ from different sequences and each such sequence generates infinitely many primes.
– Jan
Commented Dec 27, 2018 at 10:35
• Two infinite subsequences of a finite sequence can have finite intersection. The fact that some sequence contains infinitely many primes does not imply that every infinite subsequence contains infinitely many primes. Commented Dec 27, 2018 at 10:46
• But if you're taking terms from multiple different sequences, how do you know you won't happen to miss the primes? Commented Dec 27, 2018 at 11:52
• Here is a converse question, might be useful. Commented Dec 27, 2018 at 13:34

Let's have a look at the sequence $$n\times n+(-2n+2)$$

For example, if you put $$n=9$$, you will get $$9 \times 9 +(-18+2)$$

Now, we know that the sequence $$9\times n+(-16)$$ takes infinitely many prime values. However, $$9 \times 9 + (-16)$$ may or may not be one of those prime numbers. (in this case, it is not a prime)

Similarly, if you put $$n=11$$, you will get $$11 \times 11 + (-22+2)$$. Although the sequence $$11 \times n + (-20)$$ takes infinitely many prime values, $$11 \times 11 +(-20)$$ may or may not be one of those prime numbers. In this case, it is a prime.

Continuing this way, it is possible that you end up with only finitely many prime numbers.

You know, for example, that the sequence includes an infinite subset from at least one of the residue classes modulo $$d$$ for any $$d$$, including $$d$$ being a prime. That is simply a function of the sequence being infinite and there being only a finite number of residue classes.

But to use Dirichlet, you don't just need the numbers to be congruent modulo $$d$$, you need them to contain the whole arithmetic progression starting at some $$a$$.