OFFSET
1,2
COMMENTS
a(n) = 0 iff n is a square.
a(n) = 1+2*A000196(n) if n is not a square. - Robert Israel, Sep 22 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
f:= proc(n) local t; t:= floor(sqrt(n));
if n = t^2 then 0 else 1 + 2*t fi
end proc:
map(f, [$1..100]); # Robert Israel, Sep 22 2020
MATHEMATICA
ds[n_]:=Module[{s=Sqrt[n]}, If[IntegerQ[s], 0, 1+2Floor[s]]]; Array[ds, 80] (* Harvey P. Dale, Dec 05 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 02 2002
STATUS
approved
