Perhaps look into the theory of Dirichlet series? Your function is the series corresponding to the sequence $n \mapsto [\exists x\in \mathbb{N}(n=x^2+1)],$ where $[-]$ is the Iverson Bracket (google it.) The first few terms of the sequence are:
$$0,1,1,0,0,1\ldots$$