login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072689 Difference between (least square >= n) and (largest square <= n). 2
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 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
a(n) = A057427(n - A048760(n)) * (A000196(A048760(n))*2 + 1).
a(n) = A048761(n) - A048760(n).
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
Sequence in context: A128046 A102899 A353327 * A021972 A193451 A335809
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 02 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)