This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A087059 #21 Jan 15 2023 16:25:25 %S A087059 2,1,7,4,14,9,2,16,7,25,14,1,23,8,34,17,47,28,7,41,18,56,31,4,46,17, %T A087059 63,32,82,49,14,68,31,89,50,9,71,28,94,49,2,72,23,97,46,124,71,16,98, %U A087059 41,127,68,7,97,34,128,63,161,94,25,127,56,162,89,14,124,47,161,82,1,119 %N A087059 Difference between 2*n^2 and the next greater square number. %C A087059 For n >= 2, a(n) is also the smallest absolute value of all negative values in row n of the triangle D(n, m) = n^2 - m^2 - 2*n*m, for 2 <= m + 1 <= n. The negative values in row n start with m = floor(n/(1 + sqrt(2))) + 1 = ceiling(n/(1 + sqrt(2))). See also a comment on A087056 for the smallest positive numbers in row n >= 3. - _Wolfdieter Lang_, Jun 11 2015 %H A087059 Harvey P. Dale, <a href="/A087059/b087059.txt">Table of n, a(n) for n = 1..1000</a> %F A087059 a(n) = A087058(n) - 2*n^2 = A087057(n)^2 - 2*n^2 = (1 + A001951(n))^2 - 2*n^2 = (1 + floor(n*sqrt(2)))^2 - 2*n^2. %F A087059 a(n) = 2*c(n)^2 - (n - c(n))^2, with c(n) := ceiling(n/(1 + sqrt(2))), n >= 1. - _Wolfdieter Lang_, Jun 11 2015 %e A087059 a(10) = 25 because the difference between 2*10^2 = 200 and the next greater square number (225) is 25. %t A087059 (Floor[Sqrt[#]]+1)^2-#&/@Table[2n^2,{n,80}] (* _Harvey P. Dale_, Jan 15 2023 *) %o A087059 (PARI) a(n) = (1 + sqrtint(2*n^2))^2 - 2*n^2 \\ _Michel Marcus_, Jun 25 2013 %Y A087059 Cf. A001951, A087055, A087056, A087057, A087058, A087060. %K A087059 easy,nonn %O A087059 1,1 %A A087059 _Jens Voß_, Aug 07 2003