Round-up and round-down

f ( n ) = n n , g ( n ) = n n \large f(n)=\left\lfloor\dfrac{n}{\left\lfloor \sqrt{n}\right\rfloor}\right\rfloor \qquad, \qquad g(n)=\left\lceil\dfrac{n}{\left\lceil \sqrt{n}\right\rceil}\right\rceil

For positive integer n n , define functions f f and g g as above.

How many positive integers n n less than 2015 such that f ( n ) g ( n ) f(n)\neq g(n) ?


The answer is 87.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

If n n is a perfect square, say n = m 2 n=m^2 , then f ( m 2 ) = g ( m 2 ) = m f(m^2)=g(m^2)=m . If this is not the case, set n = m 2 + k n=m^2+k , where 0 < k < 2 m + 1 0<k<2m+1 . We then have:

f ( m 2 + k ) = m 2 + k m 2 + k = m 2 + k m = m + k m g ( m 2 + k ) = m 2 + k m 2 + k = m 2 + k m + 1 = m 1 + k + 1 m + 1 f(m^2+k)=\left\lfloor\dfrac{m^2+k}{\left\lfloor\sqrt{m^2+k}\right\rfloor}\right\rfloor=\left\lfloor\dfrac{m^2+k}{m}\right\rfloor=m+\left\lfloor\dfrac{k}{m}\right\rfloor\\ g(m^2+k)=\left\lceil\dfrac{m^2+k}{\left\lceil\sqrt{m^2+k}\right\rceil}\right\rceil=\left\lceil\dfrac{m^2+k}{m+1}\right\rceil=m-1+\left\lceil\dfrac{k+1}{m+1}\right\rceil

  • If k < m k<m , then k m = 0 \left\lfloor\dfrac{k}{m}\right\rfloor=0 and k + 1 m + 1 = 1 \left\lceil\dfrac{k+1}{m+1}\right\rceil=1 , then we get that f ( m 2 + k ) = g ( m 2 + k ) = m f(m^2+k)=g(m^2+k)=m .
  • If k = m k=m , then k m = k + 1 m + 1 = 1 \left\lfloor\dfrac{k}{m}\right\rfloor=\left\lceil\dfrac{k+1}{m+1}\right\rceil=1 , which implies f ( m 2 + k ) = m + 1 f(m^2+k)=m+1 and g ( m 2 + k ) = m g(m^2+k)=m .
  • If m < k < 2 m m<k<2m , then we have 1 < k m < 2 1<\dfrac{k}{m}<2 , so that k m = 1 \left\lfloor\dfrac{k}{m}\right\rfloor=1 and f ( m 2 + k ) = m + 1 f(m^2+k)=m+1 ; this also implies m + 1 < k + 1 < 2 ( m + 1 ) m+1<k+1<2(m+1) , implying 1 < k + 1 m + 1 < 2 1<\dfrac{k+1}{m+1}<2 . Thus, k + 1 m + 1 = 2 \left\lceil\dfrac{k+1}{m+1}\right\rceil=2 and g ( m 2 + k ) = m + 1 g(m^2+k)=m+1 .
  • If k = 2 m k=2m , then we have k m = k + 1 m + 1 = 2 \left\lfloor\dfrac{k}{m}\right\rfloor=\left\lceil\dfrac{k+1}{m+1}\right\rceil=2 , yielding f ( m 2 + k ) = m + 2 f(m^2+k)=m+2 and g ( m 2 + k ) = m + 1 g(m^2+k)=m+1 .

Thus, f ( n ) g ( n ) f(n)\neq g(n) for all positive integers n n which are of the form m 2 + m m^2+m or m 2 + 2 m m^2+2m for some integer m m .

For integer m m , we have 0 < m 2 + m < 2015 0<m^2+m<2015 when 1 m 44 1\leq m\leq 44 and 0 < m 2 + 2 m < 2015 0<m^2+2m<2015 when 1 m 43 1\leq m\leq 43 .

So, there are 87 \boxed{87} positive integers n n satisfied.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...