##TI-BASIC, 23 bytes sum(seq(Σ(X²+Y²=Ans,X,-Ans,Ans),Y,-Ans,Ans Pretty straightforward. `Σ(` is summation. Strangely, `sum(seq(sum(seq(` throws an `ERR:ILLEGAL NEST`, and so does `Σ(Σ(`, but `sum(seq(Σ(` is fine. I chose to put the `Σ(` on the inside to save a close-paren.