OFFSET
0,5
COMMENTS
See A319514 for comments and references.
LINKS
Peter Luschny, Table of n, a(n) for n = 0..10000
PROG
(Julia)
function A319289(n)
m = x = isqrt(n)
y = n - x^2
x <= y && ((x, y) = (2x - y, x))
isodd(m) ? y : x
end
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Sep 23 2018
STATUS
approved