# 2007 iTest Problems/Problem 58

The following problem is from the Ultimate Question of the 2007 iTest, where solving this problem required the answer of a previous problem. When the problem is rewritten, the T-value is substituted.

## Problem

For natural numbers $k,n\geq 2$, we define $$S(k,n)=\left\lfloor\frac{2^{n+1}+1}{2^{n-1}+1}\right\rfloor+\left\lfloor\frac{3^{n+1}+1}{3^{n-1}+1}\right\rfloor+\cdots+\left\lfloor\frac{k^{n+1}+1}{k^{n-1}+1}\right\rfloor$$ Compute the value of $S(10,112)-S(10,55)+S(10,2)$.

## Solution

The function $S(k,n)$ can be rewritten as $$\sum_{j=2}^{k} \left\lfloor\frac{j^{n+1}+1}{j^{n-1}+1}\right\rfloor$$

Let $x = j^{n-1}$. With the substitution, each similar part becomes $$\sum_{j=2}^{k} \left\lfloor\frac{j^2 \cdot x+1}{x+1}\right\rfloor$$ Performing polynomial division results in $$\sum_{j=2}^{k} \left\lfloor j^2 + \frac{1 - j^2}{x+1}\right\rfloor$$ $$\sum_{j=2}^{k} \left\lfloor j^2 - \frac{j^2 - 1}{j^{n-1}+1}\right\rfloor$$ When $n = 112$ or $n = 55$, then $\frac{j^2 - 1}{j^{n-1}+1}$ is close to zero, which means that $\left\lfloor j^2 - \frac{j^2 - 1}{j^{n-1}+1}\right\rfloor$ would be the same for a given $j$ when $n = 112$ or $n = 55$. Thus, $S(10,112) - S(10,55) = 0$.

That means $S(10,112) - S(10,55) + S(10,2) = S(10,2)$, and that equals $$\sum_{j=2}^{10} \left\lfloor j^2 - \frac{j^2 - 1}{j+1}\right\rfloor$$ $$\sum_{j=2}^{10} \left\lfloor j^2 - (j-1) \right\rfloor$$ $$\sum_{j=2}^{10} j^2 - \sum_{j=2}^{10} (j-1)$$ $$(4+9 \cdots 100) - (1+2 \cdots 9)$$ $$(\frac{10 \cdot 11 \cdot 21}{6} - 1) - (\frac{10 \cdot 9}{2})$$ $$384-45$$ $$\boxed{339}$$