OFFSET
0,8
COMMENTS
If a(n)=0 then n is a sum of two squares A001481, but not conversely. For the sum of two squares n = 18, 32, 41, ... we have a(n) > 0. - Thomas Ordowski, Jul 11 2014
LINKS
Michel Marcus, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
24=4^2+8;8-2^2=4, 115=10^2+15;15-3^2=6,..
MATHEMATICA
a[n_]:=n-Floor[Sqrt[n]]^2-Floor[Sqrt[n-Floor[Sqrt[n]]^2]]^2;
Table[a[n], {n, 0, 6!}]
PROG
(PARI) a(n) = my(x=sqrtint(n)^2); n - x - sqrtint((n-x))^2; \\ Michel Marcus, Dec 17 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 29 2010
STATUS
approved