It is possible to prove elementarily that there are infinitely many primes that divide some element of the sequence $a_0 = k\ge 0$, $a_n = a_{n-1}^2+ 1$ for all $n\ge 1$ by showing that for all $m$, there exists $C$ that depends only on $m$ s.t. $(a_n, a_{m + n})\le C$ and then showing that this is not possible if there are only finitely many primes that divide it.

However, I don't know of any results that might help prove the following, stronger statement:

For any (finite) set of primes $S$, there are only finitely many solutions to $$n^2 + 1 = m$$ for $m,n$ s.t. $p|mn \Rightarrow p\in S$

How would one prove this?