The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A257212 Least d>0 such that floor(n/d) - floor(n/(d+1)) <= 1. 2
 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, 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, 7, 7, 6, 6, 7, 7, 7, 7, 7, 6, 8, 8, 7, 7, 7, 7, 8, 8, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS An efficient formula for this sequence could be useful for faster computation of A024916. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 FORMULA a(n) <= ceiling(sqrt(n)) <= A257213(n) for all n>0. MATHEMATICA 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 *) 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 *) PROG (PARI) a(n)=for(d=1, n+1, 1>=n\d-n\(d+1)&&return(d)) (Haskell) a257212 n = head [d | d <- [1..], div n d - div n (d+1) <= 1] -- Reinhard Zumkeller, Apr 19 2015 CROSSREFS Cf. A257213, A024916. Sequence in context: A227196 A189172 A286888 * A001031 A336543 A035250 Adjacent sequences:  A257209 A257210 A257211 * A257213 A257214 A257215 KEYWORD nonn AUTHOR M. F. Hasler, Apr 18 2015 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 July 25 01:31 EDT 2021. Contains 346273 sequences. (Running on oeis4.)