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 A128217 #13 Jun 07 2025 04:19:14 %S A128217 0,1,4,5,8,9,10,15,16,17,18,23,24,25,26,27,34,35,36,37,38,39,46,47,48, %T A128217 49,50,51,52,61,62,63,64,65,66,67,68,77,78,79,80,81,82,83,84,85,96,97, %U A128217 98,99,100,101,102,103,104,105,116,117,118,119,120,121,122,123,124,125 %N A128217 Nonnegative integers n such that the square-root of n differs from its nearest integer by less than 1/4. %C A128217 The squares are a subsequence; apparently A052928(n-1) = number of terms between (n-1)^2 and n^2. - _Reinhard Zumkeller_, Jun 20 2015 %H A128217 Reinhard Zumkeller, <a href="/A128217/b128217.txt">Table of n, a(n) for n = 1..10000</a> %t A128217 nsrQ[n_]:=Module[{sr=Sqrt[n]},Abs[First[sr-Nearest[{Floor[sr], Ceiling[sr]},sr]]]<1/4]; Select[Range[0,150],nsrQ] (* _Harvey P. Dale_, Aug 19 2011 *) %o A128217 (Haskell) %o A128217 a128217 n = a128217_list !! (n-1) %o A128217 a128217_list = filter f [0..] where %o A128217 f x = 4 * abs (root - fromIntegral (round root)) < 1 %o A128217 where root = sqrt $ fromIntegral x %o A128217 -- _Reinhard Zumkeller_, Jun 20 2015 %o A128217 (Python) %o A128217 from itertools import count, islice %o A128217 from math import isqrt %o A128217 def A128217_gen(startvalue=0): # generator of terms >= startvalue %o A128217 return filter(lambda n:(m:=n<<4)<(k:=(isqrt(n)<<2)+1)**2 or m>(k+2)**2, count(max(startvalue,0))) %o A128217 A128217_list = list(islice(A128217_gen(),40)) # _Chai Wah Wu_, Jun 06 2025 %Y A128217 Cf. A063656. See the first differences in A128218. %Y A128217 Cf. A052928, A000290, A063657. %K A128217 nonn %O A128217 1,3 %A A128217 _John W. Layman_, Feb 19 2007 %E A128217 Offset changed by _Reinhard Zumkeller_, Jun 20 2015