Subfield: Number Theory


Question: For every real number $x$, define $\lfloor x\rfloor$ to be equal to the greatest integer less than or equal to $x$. (We call this the "floor" of $x$.) For example, $\lfloor 4.2\rfloor=4,\lfloor 5.7\rfloor=5$, $\lfloor-3.4\rfloor=-4,\lfloor 0.4\rfloor=0$, and $\lfloor 2\rfloor=2$.
For each integer $n \geq 1$, define $f(n)$ to be equal to an infinite sum:

$$
f(n)=\left\lfloor\frac{n}{1^{2}+1}\right\rfloor+\left\lfloor\frac{2 n}{2^{2}+1}\right\rfloor+\left\lfloor\frac{3 n}{3^{2}+1}\right\rfloor+\left\lfloor\frac{4 n}{4^{2}+1}\right\rfloor+\left\lfloor\frac{5 n}{5^{2}+1}\right\rfloor+\cdots
$$

(The sum contains the terms $\left\lfloor\frac{k n}{k^{2}+1}\right\rfloor$ for all positive integers $k$, and no other terms.)

Suppose $f(t+1)-f(t)=2$ for some odd positive integer $t$. Prove that $t$ is a prime number.

Solution:
Before working on the specific question we have been asked, we simplify the given expression for $f(n)$ by noting that if $k \geq n$, then $k n \leq k^{2}<k^{2}+1$.

This means that if $k \geq n$, we have $0<\frac{k n}{n^{2}+1}<1$ and so $\left\lfloor\frac{k n}{k^{2}+1}\right\rfloor=0$.

This means that, for a fixed positive integer $n$, the apparently infinite sum that represents $f(n)$ can be stopped when $k=n-1$ because every subsequent term equals 0 .

Thus,

$$
f(n)=\left\lfloor\frac{n}{1^{2}+1}\right\rfloor+\left\lfloor\frac{2 n}{2^{2}+1}\right\rfloor+\left\lfloor\frac{3 n}{3^{2}+1}\right\rfloor+\cdots+\left\lfloor\frac{(n-2) n}{(n-2)^{2}+1}\right\rfloor+\left\lfloor\frac{(n-1) n}{(n-1)^{2}+1}\right\rfloor
$$

We note that

$$
\begin{aligned}
& f(1)=0 \quad \text { (since no terms are non-zero) } \\
& f(2)=\left\lfloor\frac{1 \cdot 2}{1^{2}+1}\right\rfloor=1 \\
& f(3)=\left\lfloor\frac{1 \cdot 3}{1^{2}+1}\right\rfloor+\left\lfloor\frac{2 \cdot 3}{2^{2}+1}\right\rfloor=\left\lfloor\frac{3}{2}\right\rfloor+\left\lfloor\frac{6}{5}\right\rfloor=1+1=2 \\
& f(4)=\left\lfloor\frac{1 \cdot 4}{1^{2}+1}\right\rfloor+\left\lfloor\frac{2 \cdot 4}{2^{2}+1}\right\rfloor+\left\lfloor\frac{3 \cdot 4}{3^{2}+1}\right\rfloor=\left\lfloor\frac{4}{2}\right\rfloor+\left\lfloor\frac{8}{5}\right\rfloor+\left\lfloor\frac{12}{10}\right\rfloor=2+1+1=4
\end{aligned}
$$

Suppose that $t$ is an odd positive integer for which $f(t+1)-f(t)=2$.

We will assume that $t$ is not a prime number, and show that $f(t+1)-f(t) \neq 2$. This will show us that if $f(t+1)-f(t)=2$, it must be the case that $t$ is prime. Since $t$ is odd and not prime, then $t=1$ or $t$ is composite.

We note that when $t=1$, we obtain $f(2)-f(1)=1-0=1 \neq 2$.

Next, suppose that $t$ is odd and composite.

Since $t$ is odd and composite, then $t$ can be written as $t=r s$ for some odd positive integers $r \geq s>1$. ( $t$ can be written in this form in at least one way, so we take one of these possibilities.)

In this case, consider $f(t+1)-f(t)$.

We can write this as

$$
\begin{aligned}
f(t+1)-f(t)= & \left\lfloor\frac{t+1}{1^{2}+1}\right\rfloor+\left\lfloor\frac{2(t+1)}{2^{2}+1}\right\rfloor+\cdots+\left\lfloor\frac{(t-1)(t+1)}{(t-1)^{2}+1}\right\rfloor+\left\lfloor\frac{t(t+1)}{t^{2}+1}\right\rfloor \\
& -\left\lfloor\frac{t}{1^{2}+1}\right\rfloor-\left\lfloor\frac{2 t}{2^{2}+1}\right\rfloor-\cdots-\left\lfloor\frac{(t-1) t}{(t-1)^{2}+1}\right\rfloor
\end{aligned}
$$

We re-write this as

$$
\begin{gathered}
f(t+1)-f(t)=\left(\left\lfloor\frac{t+1}{1^{2}+1}\right\rfloor-\left\lfloor\frac{t}{1^{2}+1}\right\rfloor\right)+\left(\left\lfloor\frac{2(t+1)}{2^{2}+1}\right\rfloor-\left\lfloor\frac{2 t}{2^{2}+1}\right\rfloor\right)+\cdots \\
+\left(\left\lfloor\frac{(t-1)(t+1)}{(t-1)^{2}+1}\right\rfloor-\left\lfloor\frac{(t-1) t}{(t-1)^{2}+1}\right\rfloor\right)+\left\lfloor\frac{t(t+1)}{t^{2}+1}\right\rfloor
\end{gathered}
$$

In the $t-1$ sets of parentheses, we have terms of the form $\left\lfloor\frac{k(t+1)}{k^{2}+1}\right\rfloor-\left\lfloor\frac{k t}{k^{2}+1}\right\rfloor$ for each integer $k$ from 1 to $t-1$.

We know that $\frac{k(t+1)}{k^{2}+1}>\frac{k t}{k^{2}+1}$ because both $k$ and $t$ are positive, the denominators are



equal and $k(t+1)>k t$.

Thus, $\left.\left\lfloor\frac{k(t+1)}{k^{2}+1}\right\rfloor \geq \frac{k t}{k^{2}+1}\right\rfloor$. (The greatest integer less than or equal to the first fraction must be at least as large as the greatest integer less than or equal to the second fraction.) This means that the $t-1$ differences in parentheses, each of which is an integer, is at least 0 .

To show that $f(t+1)-f(t) \neq 2$, we show that there are at least 2 places where the difference is at least 1, and that the final term is at least 1 . This will tell us that $f(t+1)-f(t) \geq 3$ and so $f(t+1)-f(t) \neq 2$, which will tell us that $t$ cannot be composite, and so $t$ must be prime, as required.

Consider $\left\lfloor\frac{t(t+1)}{t^{2}+1}\right\rfloor$.

Since $t(t+1)=t^{2}+t \geq t^{2}+1$, then $\frac{t(t+1)}{t^{2}+1} \geq 1$, which means that $\left\lfloor\frac{t(t+1)}{t^{2}+1}\right\rfloor \geq 1$.

Consider $\left\lfloor\frac{t+1}{1^{2}+1}\right\rfloor-\left\lfloor\frac{t}{1^{2}+1}\right\rfloor=\left\lfloor\frac{t+1}{2}\right\rfloor-\left\lfloor\frac{t}{2}\right\rfloor$.

Since $t$ is odd, then we write $t=2 u+1$ for some positive integer $u$, which gives

$$
\left\lfloor\frac{t+1}{2}\right\rfloor-\left\lfloor\frac{t}{2}\right\rfloor=\left\lfloor\frac{2 u+2}{2}\right\rfloor-\left\lfloor\frac{2 u+1}{2}\right\rfloor=\lfloor u+1\rfloor-\left\lfloor u+\frac{1}{2}\right\rfloor=(u+1)-u=1
$$

Recall that $t=r s$ with $r \geq s>1$.

Consider the term $\left\lfloor\frac{r(t+1)}{r^{2}+1}\right\rfloor-\left\lfloor\frac{r t}{r^{2}+1}\right\rfloor$.

We have

$$
\left\lfloor\frac{r(t+1)}{r^{2}+1}\right\rfloor-\left\lfloor\frac{r t}{r^{2}+1}\right\rfloor=\left\lfloor\frac{r(r s+1)}{r^{2}+1}\right\rfloor-\left\lfloor\frac{r \cdot r s}{r^{2}+1}\right\rfloor=\left\lfloor\frac{r^{2} s+r}{r^{2}+1}\right\rfloor-\left\lfloor\frac{r^{2} s}{r^{2}+1}\right\rfloor
$$

We note that $\frac{r^{2} s+r}{r^{2}+1} \geq \frac{r^{2} s+s}{r^{2}+1}=s$ and $\frac{r^{2} s}{r^{2}+1}<\frac{r^{2} s+s}{r^{2}+1}=s$.

Thus, $\left\lfloor\frac{r^{2} s+r}{r^{2}+1}\right\rfloor \geq s$.

Also, $\left\lfloor\frac{r^{2} s}{r^{2}+1}\right\rfloor<s$ which means $\left\lfloor\frac{r^{2} s}{r^{2}+1}\right\rfloor \leq s-1$ and so $\left\lfloor\frac{r(t+1)}{r^{2}+1}\right\rfloor-\left\lfloor\frac{r t}{r^{2}+1}\right\rfloor \geq 1$.

Therefore, if $t$ is odd and not prime, then $f(t+1)-f(t) \neq 2$ because we have found three terms that are equal to at least 1 meaning that $f(t+1)-f(t) \geq 3$, and so if $f(t+1)-f(t)$, then $t$ must be prime.

Here is an alternative approach so show that $f(t+1)-f(t) \geq 3$ when $t$ is odd and composite.

As above, we look for at least 3 integers $k$ for which $\left\lfloor\frac{k(t+1)}{k^{2}+1}\right\rfloor-\left\lfloor\frac{k t}{k^{2}+1}\right\rfloor \geq 1$. Here, we allow for the possibility that $k=t$ knowing that the second term in this difference will be 0 in this case.

The positive integer $k$ has the property that $\left\lfloor\frac{k(t+1)}{k^{2}+1}\right\rfloor-\left\lfloor\frac{k t}{k^{2}+1}\right\rfloor \geq 1$ exactly when there is an integer $N$ for which $\frac{k(t+1)}{k^{2}+1} \geq N>\frac{k t}{k^{2}+1}$.



This pair of inequalities is equivalent to the pair of inequalities $t+1 \geq N \cdot \frac{k^{2}+1}{k}>t$ which is in turn equivalent to $t+1 \geq N k+\frac{N}{k}>t$.

The following three pairs $(N, k)$ of integers satisfy this equation:

- $k=1$ and $N=\frac{t+1}{2}$ (noting that $t$ is odd), which give $N k+\frac{N}{k}=t+1$;
- $k=r$ and $N=s$, which give $N k+\frac{N}{k}=r s+\frac{s}{r}$ (noting that $\left.\frac{s}{r}<1\right)$
- $k=t$ and $N=1$, which give $N k+\frac{N}{k}=t+\frac{1}{t}$.

This shows that $f(t+1)-f(t) \geq 3$ when $t$ is odd and composite, as required.