This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A087060 Difference between 2n^2 and the nearest square number. 7
 1, 1, 2, 4, 1, 8, 2, 7, 7, 4, 14, 1, 14, 8, 9, 17, 2, 23, 7, 16, 18, 7, 31, 4, 25, 17, 14, 32, 1, 36, 14, 23, 31, 8, 49, 9, 34, 28, 17, 49, 2, 47, 23, 28, 46, 7, 62, 16, 41, 41, 18, 68, 7, 56, 34, 31, 63, 4, 73, 25, 46, 56, 17, 89, 14, 63, 47, 32, 82, 1, 82, 36, 49, 73, 14, 103, 23, 68 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS max(a(n)/n) approaches sqrt(2), and the indices of the maxima are apparently in A227792. - Ralf Stephan, Sep 23 2013 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 FORMULA a(n) = min [A087056(n), A087059(n)] = min [2*n^2 - (floor[n*sqrt(2)])^2, (1 + floor[n*sqrt(2)])^2 - 2*n^2] EXAMPLE a(10) = 4 because the difference between 2*10^2 = 200 and the nearest square number (196) is 4. MATHEMATICA dnsn[n_]:=Module[{c=2n^2, a, b}, a=Floor[Sqrt[c]]^2; b=Ceiling[Sqrt[c]]^2; Min[c-a, b-c]]; Array[dnsn, 80] (* Harvey P. Dale, Jul 01 2017 *) CROSSREFS Cf. A001951, A087055, A087056, A087057, A087058, A087059. Sequence in context: A221073 A181266 A302192 * A248112 A173122 A232723 Adjacent sequences:  A087057 A087058 A087059 * A087061 A087062 A087063 KEYWORD easy,nonn,look AUTHOR Jens Voß, Aug 07 2003 STATUS approved

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

Last modified January 23 13:09 EST 2019. Contains 319394 sequences. (Running on oeis4.)