Use the basics

Find the sum of all positive integers $$d$$ such that

$$d\mid(n^2+1)$$

$$d\mid[(n+1)^2+1]$$

Details & Assumptions

$$\bullet$$ $$n$$ is a non-negative integer

$$\bullet$$ $$a \mid b$$ means "$$a$$ divides $$b$$" i.e. $$b$$ is divisible by $$a$$.

×