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 A253181 #23 May 05 2021 13:40:17 %S A253181 1,2,3,4,5,9,13,15,16,17,25,32,35,36,37,40,43,46,49,52,56,63,64,65,81, %T A253181 99,100,101,109,121,136,143,144,145,152,158,169,175,190,195,196,197, %U A253181 225,243,255,256,257,289,312,317,323,324,325,331,336,351,356,361,366,377 %N A253181 Numbers n such that the distance between n^3 and the nearest square is less than n. %C A253181 Distance can be zero, that is, cubes that are squares are included. %C A253181 Numbers n such that A002938(n) < n. %H A253181 Daniel Mondot, <a href="/A253181/b253181.txt">Table of n, a(n) for n = 1..10000</a> %e A253181 The distance between 5^3=125 and the nearest square 11^2=121 is less than 5, so 5 is in the sequence. %t A253181 dnsQ[n_]:=Module[{n3=n^3,sr},sr=Sqrt[n3];Min[n3-Floor[sr]^2, Ceiling[ sr]^2- n3]<n]; Select[Range[400],dnsQ] (* _Harvey P. Dale_, Dec 23 2015 *) %o A253181 (Python) %o A253181 def isqrt(a): %o A253181 sr = 1 << (int.bit_length(int(a)) >> 1) %o A253181 while a < sr*sr: sr>>=1 %o A253181 b = sr>>1 %o A253181 while b: %o A253181 s = sr + b %o A253181 if a >= s*s: sr = s %o A253181 b>>=1 %o A253181 return sr %o A253181 for n in range(1000): %o A253181 cube = n*n*n %o A253181 r = isqrt(cube) %o A253181 sqr = r**2 %o A253181 if cube-sqr < n or sqr+2*r+1-cube < n: print(str(n), end=',') %Y A253181 Cf. A000290, A000578, A002760. %Y A253181 Cf. A116885, A002938, A077119. %Y A253181 Cf. A268509, A268510. %K A253181 nonn %O A253181 1,2 %A A253181 _Alex Ratushnyak_, Mar 23 2015