This problem is a follow up to this post.
It was shown that if $n\in\mathbf{N}$, $a_n=n^2+1$ and $d(a_n)$ counts the number of divisors of $a_n$ then
$$\gcd\left(a_n,2^{d(a_n)}\right) = \begin{cases} 1, & \text{if $n$ is even} \\[2ex] 2, & \text{if $n$ is odd} \end{cases}$$ Suppose that $n$ is even. According to Bezout's identity there exist integers $x$ and $y$ such that $$xa_n+y2^{d(a_n)}=1$$ Let's say we know $a_n$ but we do not know $d(a_n)$. Surely $x$ and $y$ cannot both be positive?
Can we show that the identity $xa_n+y2^{d(a_n)}=1$ has solutions for $x=1$?
If such a solution exist then $y$ is negative and $$-y2^{d(a_n)}=-n^2$$ and so $-y$ must be a square. We can then show that $d(a_n)=\ln\left({n^2 \above 1.5pt y} \right) \left({1 \above 1.5pt \ln(2)}\right)$. Trivally $y<n^2$.
Update: since $y$ is square we can write $$d(a_n)={2 \above 1.5pt \ln(2)} \ln\Bigg({n \above 1.5 pt m}\Bigg)=2.8853901\ldots\cdot\ln\Bigg({n \above 1.5 pt m}\Bigg)$$ where $y=m^2$
If we have that
$$a_n+y2^{d(a_n)}=1$$
then
$$(-y)2^{d(a_n)} = a_n-1$$
so
$$2^{d(n^2+1)} | n^2$$
Although this is true for very many cases (such as whenever $n^2+1$ is prime which probably happens infinitely often), it isn't always true. For instance, whenever
$$n\equiv 2\mod 4$$
we only have $2$ twos on the RHS, so this can only be true when $n^2+1$ is prime. This holds for
$$2\to 5,6\to 37,10\to 101,14\to 197$$
but it fails, since $18^2+1=325=5^2\cdot 13$.