How prove this limit If $\phi $ is an irrational number the following limit holds 
$$\lim_{n \to \infty } \left( \left( \sum_{k = 0}^{[n\phi ]} \frac{1}{[ k\phi^{-1}] + 2}  \right) - \left( \sum_{k = 0}^n \frac{[k\phi ]}{( k + 1)( k + 2)} \right) \right) = \frac{1}{2} + \phi \tag 1$$
Here $[x]$ is the gauss floor  function. How can we prove $(1)$? Thank you. 
(It is amazing since it doesn't  remain  true if $ \phi $  is a rational number.
 As we know, the Polygamma functions  define a class of  limits of harmonic sums. The following limit can be regard as a  kind of a generalization)
$$\lim_{n \to \infty } \left( \sum\limits_{k = 0}^{[n\phi ]} \frac{1}{\left[ k\phi^{-1} \right] + x} - \phi \ln n \right)$$
 A: $\def\floor#1{\lfloor #1\rfloor}
\def\ceil#1{\lceil #1\rceil}$
This is really a question about manipulating sums, floors, and ceilings, and one book that discusses these things well is "Concrete Mathematics".
Consider the first sum $S$:
$$ S = \sum_{0\leq k\leq \lfloor n\phi\rfloor} \frac{1}{\lfloor
  k/\phi\rfloor+2}, $$
and eliminate the floor function by introducing a new variable $j$,
such that $j=\floor{k/\phi}$ whenever $j\leq k/\phi<j+1$ (by
definition of floor):
$$ \sum_{0\leq k\leq \floor{n\phi}} \sum_j \frac{1}{j+2}[\phi j\leq
  k<(j+1)\phi]. $$
The condition in the Iverson bracket there is equivalent to
$$[\ceil{j\phi}\leq k<\ceil{(j+1)\phi}]. $$
This is a range of $k$, of length $\ceil{(j+1)\phi} - \ceil{j\phi}$,
and these intervals, for all $0\leq j<n$ fit completely within $0\leq
k\leq \floor{n\phi}$ and cover it totally. So the sum is equal to
$$ \sum_{0\leq j<n} \frac{\ceil{(j+1)\phi} - \ceil{j\phi}}{j+2}. $$
This sum telescopes a litle, so we can shift $j$ down by one in the
first term to get
$$ \frac{\ceil{n\phi}}{n+1} + \sum_{1\leq j<n}
\frac{\ceil{j\phi}}{(j+1)(j+2)}. $$
Finally, the entire limit is
$$ \frac{\ceil{n\phi}}{n+1} + \sum_{1\leq j<n}
\frac{\ceil{j\phi}-\floor{j\phi}}{(j+1)(j+2)}. $$
Because $\phi$ is irrational, the numerator of the summands is always
$1$, and 
$$ \sum_{1\leq k<n} \frac{1}{(k+1)(k+2)} = \frac12 - \frac1{1+n}. $$
Hence the expression in the limit is
$$ \frac{\ceil{n\phi}}{n+1} + \frac12 + O(n^{-1}) = \phi+\frac12 +
O(1/n), $$
so the limit is
$$ \frac12+\phi. $$
