  We combine transcendental methods and the modular approaches to the $ABC$
conjecture to show that the largest prime factor of $n^2+1$ is at least of size
$(\log_2 n)^2/\log_3n$ where $\log_k$ is the $k$-th iterate of the logarithm.
This gives a substantial improvement on the best available estimates, which are
essentially of size $\log_2 n$ going back to work of Chowla in 1934. Using the
same ideas, we also obtain significant progress on subexpoential bounds for the
$ABC$ conjecture, which in a case gives the first improvement on a result by
Stewart and Yu dating back over two decades. Central to our approach is the
connection between Shimura curves and the $ABC$ conjecture developed by the
author.
