login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257213
Least d>0 such that floor(n/d) = floor(n/(d+1)).
4
1, 2, 3, 2, 3, 3, 4, 4, 3, 5, 4, 4, 5, 5, 5, 4, 6, 6, 5, 5, 7, 6, 6, 6, 5, 7, 7, 7, 6, 6, 8, 8, 7, 7, 7, 6, 8, 8, 8, 8, 7, 7, 9, 9, 9, 8, 8, 8, 7, 10, 9, 9, 9, 9, 8, 8, 10, 10, 10, 10, 9, 9, 9, 8, 11, 11, 10, 10, 10, 10, 9, 9, 11, 11, 11, 11, 11, 10, 10, 10
OFFSET
0,2
COMMENTS
For n > 1: a(A043548(n)) = n. - Reinhard Zumkeller, Apr 19 2015
LINKS
FORMULA
a(n) >= A003059(n+1) = floor(sqrt(n))+1 >= A003059(n) = ceiling(sqrt(n)) >= A257212(n), with strict inequality (in the middle relation) when n is a square.
a(k^2-1) = k for k > 1. Proof: For n=k^2-1=(k-1)*(k+1), floor(n/k) = k-1 = n/(k+1), but n/(k-1)=k+1 and when denominators decrease further, this keeps increasing.
a(k^2) >= k+d when k > d*(d-1). Proof: This follows from k^2/(k+d) = k-d+d^2/(k+d), which shows that a(k) >= d when k > d*(d-1).
a(n) = A259361(n) + 1 + floor(sqrt((A232091(n+1) - 1 - n) + A079813(n+1)) + A079813(n+1)/2) = floor((sqrt(4*n+1)+1)/2) + floor(sqrt(ceiling((n+1) / ceiling(sqrt(n+1)) + 1) * ceiling(sqrt(n+1)) - round(sqrt(n+1)) - n - 1) + (ceiling(sqrt(n+1)) - round(sqrt(n+1)))/2). - Haofen Liang, Aug 25 2021
a(n) = floor(sqrt(p*q - n) + (p + q)/2), where p = floor(sqrt(n)) and q = floor(sqrt(n+1) + 3/2). - Ridouane Oudra, Jan 24 2023
EXAMPLE
a(0)=1 because 0/1 = 0/2.
a(1)=2 because [1/1] = 1 > [1/2] = 0 = [1/3], where [x] := floor(x).
a(2)=3 because [2/1] = 2 > [2/2] = 1 > [2/3] = 0 = [2/4].
MATHEMATICA
f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] != Floor[k/(d + 1)], d++]; Sow@ d] // Flatten // Rest]; f@ 79 (* Michael De Vlieger, Apr 18 2015 *)
PROG
(PARI) A257213(n)=for(d=sqrtint(n)+1, n+1, n\d==n\(d+1)&&return(d))
(Haskell)
a257213 n = head [d | d <- [1..], div n d == div n (d + 1)]
-- Reinhard Zumkeller, Apr 19 2015
CROSSREFS
Cf. A043548.
Sequence in context: A026256 A079715 A030397 * A205780 A204905 A082597
KEYWORD
nonn,nice,hear
AUTHOR
M. F. Hasler, Apr 18 2015
STATUS
approved