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 A257212 #15 Oct 18 2015 12:57:45 %S A257212 1,1,1,2,2,2,2,2,3,2,3,3,3,3,3,4,3,3,4,4,3,4,4,4,5,4,4,4,5,5,4,4,5,5, %T A257212 5,4,5,5,5,5,6,6,5,5,5,6,6,6,5,5,6,6,6,6,5,7,6,6,6,6,7,7,7,6,6,6,7,7, %U A257212 7,7,6,6,7,7,7,7,7,6,8,8,7,7,7,7,8,8,8 %N A257212 Least d>0 such that floor(n/d) - floor(n/(d+1)) <= 1. %C A257212 An efficient formula for this sequence could be useful for faster computation of A024916. %H A257212 Reinhard Zumkeller, <a href="/A257212/b257212.txt">Table of n, a(n) for n = 0..10000</a> %F A257212 a(n) <= ceiling(sqrt(n)) <= A257213(n) for all n>0. %t A257212 f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] - Floor[k/(d + 1)] > 1, d++]; Sow[d]] // Flatten // Rest]; f@ 86 (* _Michael De Vlieger_, Apr 18 2015 *) %t A257212 ld[n_]:=Module[{d=1},While[Floor[n/d]-Floor[n/(d+1)]>1,d++];d]; Array[ ld,90,0] (* _Harvey P. Dale_, Oct 18 2015 *) %o A257212 (PARI) a(n)=for(d=1,n+1,1>=n\d-n\(d+1)&&return(d)) %o A257212 (Haskell) %o A257212 a257212 n = head [d | d <- [1..], div n d - div n (d+1) <= 1] %o A257212 -- _Reinhard Zumkeller_, Apr 19 2015 %Y A257212 Cf. A257213, A024916. %K A257212 nonn %O A257212 0,4 %A A257212 _M. F. Hasler_, Apr 18 2015