Link: https://projecteuler.net/problem=864
For short, you are asked to calculate: $\sum\limits_{i=1}^C \mu^2(i^2+1)$, where $\mu$ is the Mobius function and $C=123567101113$ is a large integer constant.
My attempts: For each prime $p$ of type $4k+1$, there exists two $n$ such that $n^2+1 \equiv 0\pmod{p}$. By Hensel lifting, there exists two $n$ such that $n^2+1 \equiv 0\pmod{p^2}$.
By CRT, for $p_1, p_2, ..., p_m$ of type $4k+1$, there exists $2^m$ choices of $n$ ($n \leq p_1^2p_2^2...p_m^2$) such that $n^2+1 \equiv 0 \pmod{ p_1^2p_2^2...p_m^2}$.
So by the principle of inclusion-exclusion (PIE), the solution looks like:
$$\sum\limits_{\substack{d \mid n,\\ d \text{ contains only} \\ \text{prime factors of }4k+1}} \mu(d)\left\lfloor \frac{n}{d^2} \right\rfloor 2^{w(d)}\label{1}\tag{1}$$
where $w(d)$ is the number of prime factors of $d$. However, Eq. \eqref{1} is not accurate because of the round up: For example, $n=7$ and $d=5$, $7^2+1 = 50$ contains a prime factor $5$. Generally speaking I don't know how many $n \leq (C \mod d)$ such that $n^2+1 \equiv 0\,(\mod d)$.
Also, Pell equations $x^2 - kd^2 = -1$ are considered, but no progress as well.
It is worth mentioning that a similar problem (Project Euler 399, Constrained square-free numbers) is based on Wall's conjecture (not proved yet), thus undetermined.
I have investigated into serval materials, e.g., D. R. Heath-Brown's paper "Square-free values of $n^2+1$", and a StackExchange post. Anyway, these materials are valuable, but they are theoretic rather than algorithmic. To be honest, due to limited knowledge on number theory, I don't dive deep. Also, I don't know whether they are helpful for this problem. I try to do brute force on two computers (Intel I7/Mac) with the sympy.factorint() API, but it becomes rather slow when $i$ comes to $\sim 1e7$.
============ Updated: I have solved it. The answer is 11057293xxxx, if you are interested, please contact me privately.