login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257213 Least d>0 such that floor(n/d) = floor(n/(d+1)). 4

%I #43 Jan 25 2023 09:57:38

%S 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,

%T 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,

%U 11,10,10,10,10,9,9,11,11,11,11,11,10,10,10

%N Least d>0 such that floor(n/d) = floor(n/(d+1)).

%C For n > 1: a(A043548(n)) = n. - _Reinhard Zumkeller_, Apr 19 2015

%H Michael De Vlieger, <a href="/A257213/b257213.txt">Table of n, a(n) for n = 0..10000</a>

%F 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.

%F 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.

%F 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).

%F 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

%F 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

%e a(0)=1 because 0/1 = 0/2.

%e a(1)=2 because [1/1] = 1 > [1/2] = 0 = [1/3], where [x] := floor(x).

%e a(2)=3 because [2/1] = 2 > [2/2] = 1 > [2/3] = 0 = [2/4].

%t 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 *)

%o (PARI) A257213(n)=for(d=sqrtint(n)+1,n+1,n\d==n\(d+1)&&return(d))

%o (Haskell)

%o a257213 n = head [d | d <- [1..], div n d == div n (d + 1)]

%o -- _Reinhard Zumkeller_, Apr 19 2015

%Y Cf. A003059, A257212.

%Y Cf. A043548.

%K nonn,nice,hear

%O 0,2

%A _M. F. Hasler_, Apr 18 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 16:04 EDT 2024. Contains 372003 sequences. (Running on oeis4.)