Given a number $X$ , we need to find a number $Y$ such that $X+Y$ can be expressed as sum of two squares (say $a^2+b^2$).
It can be observed that number of $Y$ are infinite (and can be generated by plugging value of a and b in $a²+b²-X$).
But, how can we find $Y$ for given number $X$ so X+Y² can be expressed as sum of two squares?
Edit : for example if $X=32$ is given, than $Y$ can be $3$ such that $32 + 3² = 41$ and $41$ can be split into sum of squares of $4$ and $5$ ($4² + 5² = 41$).
Choose an $a$ so that $X-a^2$ is odd: $$X-a^2=2Y+1=(Y+1)^2-Y^2,$$and that implies $$X+Y^2=a^2+(Y+1)^2.$$