A072689 Difference between (least square >= n) and (largest square <= n).
0, 3, 3, 0, 5, 5, 5, 5, 0, 7, 7, 7, 7, 7, 7, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Comments