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$.
Determine a polynomial $p(x)$ so that for every positive integer $m>4$,

$$
\lfloor p(m)\rfloor=\left\lfloor\frac{1}{3}\right\rfloor+\left\lfloor\frac{2}{3}\right\rfloor+\left\lfloor\frac{3}{3}\right\rfloor+\ldots+\left\lfloor\frac{m-2}{3}\right\rfloor+\left\lfloor\frac{m-1}{3}\right\rfloor
$$

(The sum has $m-1$ terms.)

A polynomial $f(x)$ is an algebraic expression of the form $f(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0}$ for some integer $n \geq 0$ and for some real numbers $a_{n}, a_{n-1}, \ldots, a_{1}, a_{0}$.

Solution:
For every positive integer $m>4$, let

$$
q(m)=\left\lfloor\frac{1}{3}\right\rfloor+\left\lfloor\frac{2}{3}\right\rfloor+\left\lfloor\frac{3}{3}\right\rfloor+\ldots+\left\lfloor\frac{m-2}{3}\right\rfloor+\left\lfloor\frac{m-1}{3}\right\rfloor
$$

Extending our work from (a), we know that $k-1 \leq \frac{3 k-3}{3}<\frac{3 k-2}{3}<\frac{3 k-1}{3}<k$ for each positive integer $k$, and so $\left\lfloor\frac{3 k-3}{3}\right\rfloor=\left\lfloor\frac{3 k-2}{3}\right\rfloor=\left\lfloor\frac{3 k-1}{3}\right\rfloor=k-1$.

Every positive integer $m>4$ can be written as $m=3 s$ or $m=3 s+1$ or $m=3 s+2$, for some positive integer $s$, depending on its remainder when divided by 3 .

We can thus write

$$
\begin{aligned}
q(3 s) & =\left\lfloor\frac{1}{3}\right\rfloor+\left\lfloor\frac{2}{3}\right\rfloor+\left\lfloor\frac{3}{3}\right\rfloor+\ldots+\left\lfloor\frac{3 s-2}{3}\right\rfloor+\left\lfloor\frac{3 s-1}{3}\right\rfloor \\
& =2 \cdot 0+3(1+2+3+\cdots+(s-1)) \\
& =3 \cdot \frac{1}{2} \cdot(s-1) s \\
& =\frac{3 s(s-1)}{2} \\
& =\frac{3 s(3 s-3)}{6} \\
q(3 s+1) & =\left\lfloor\frac{1}{3}\right\rfloor+\left\lfloor\frac{2}{3}\right\rfloor+\left\lfloor\frac{3}{3}\right\rfloor+\ldots+\left\lfloor\frac{3 s-2}{3}\right\rfloor+\left\lfloor\frac{3 s-1}{3}\right\rfloor+\left\lfloor\frac{3 s}{3}\right\rfloor \\
& =q(3 s)+s \\
& =\frac{3 s(3 s-3)}{6}+\frac{3 s \cdot 2}{6} \\
& =\frac{3 s(3 s-1)}{6} \\
q(3 s+2) & =q(3 s+1)+\left\lfloor\frac{3 s+1}{3}\right\rfloor \\
& =\frac{3 s(3 s-1)}{6}+s \\
& =\frac{3 s(3 s-1)}{6}+\frac{3 s \cdot 2}{6} \\
& =\frac{3 s(3 s+1)}{6}
\end{aligned}
$$

We want to find a polynomial $p(x)$ for which $q(m)=\lfloor p(m)\rfloor$ for every positive integer $m>4$.



In other words, we want to find a polynomial $p(x)$ for which

$$
\lfloor p(3 s)\rfloor=\frac{3 s(3 s-3)}{6} \quad\lfloor p(3 s+1)\rfloor=\frac{3 s(3 s-1)}{6} \quad\lfloor p(3 s+2)\rfloor=\frac{3 s(3 s+1)}{6}
$$

for every positive integer $s$.

We will show that the polynomial $p(x)=\frac{(x-1)(x-2)}{6}$ satisfies the desired conditions.

If $x=3 s+1$ for some positive integer $s$, then

$$
\frac{(x-1)(x-2)}{6}=\frac{(3 s+1-1)(3 s+1-2)}{6}=\frac{3 s(3 s-1)}{6}
$$

We note that $3 s$ is a multiple of 3 . Since $3 s$ and $3 s-1$ are consecutive integers, then one of these is a multiple of 2 . Thus, $3 s(3 s-1)$ is a multiple of 6 and so $\frac{3 s(3 s-1)}{6}$ is an integer.

This means that $\left\lfloor\frac{3 s(3 s-1)}{6}\right\rfloor=\frac{3 s(3 s-1)}{6}$.

Therefore, $q(3 s+1)=\frac{3 s(3 s-1)}{6}=\left\lfloor\frac{3 s(3 s-1)}{6}\right\rfloor=\lfloor p(3 s+1)\rfloor$.

If $x=3 s+2$ for some positive integer $s$, then

$$
\frac{(x-1)(x-2)}{6}=\frac{(3 s+2-1)(3 s+2-2)}{6}=\frac{3 s(3 s+1)}{6}
$$

We note that $3 s$ is a multiple of 3 . Since $3 s$ and $3 s+1$ are consecutive integers, then one of these is a multiple of 2 . Thus, $3 s(3 s+1)$ is a multiple of 6 and so $\frac{3 s(3 s+1)}{6}$ is an integer.

This means that $\left\lfloor\frac{3 s(3 s+1)}{6}\right\rfloor=\frac{3 s(3 s+1)}{6}$.

Therefore, $q(3 s+2)=\frac{3 s(3 s+1)}{6}=\left\lfloor\frac{3 s(3 s+1)}{6}\right\rfloor=\lfloor p(3 s+2)\rfloor$.

If $x=3 s$ for some positive integer $s$, then

$$
\frac{(x-1)(x-2)}{6}=\frac{(3 s-1)(3 s-2)}{6}=\frac{9 s^{2}-9 s+2}{6}
$$

Now, $\frac{9 s^{2}-9 s}{6}=\frac{9 s(s-1)}{6}$ is an integer because $9 s$ is a multiple of 3 and one of $s$ and $s-1$ is even.

Since $\frac{9 s^{2}-9 s+2}{6}=\frac{9 s^{2}-9 s}{6}+\frac{1}{3}$, then $\frac{9 s^{2}-9 s+2}{6}$ is $\frac{1}{3}$ more than an integer which means that $\left\lfloor\frac{9 s^{2}-9 s+2}{6}\right\rfloor=\frac{9 s^{2}-9 s}{6}=\frac{3 s(3 s-3)}{6}=q(3 s)$.

Therefore, $q(3 s)=\frac{3 s(3 s-3)}{6}=\left\lfloor\frac{(3 s-1)(3 s-2)}{6}\right\rfloor=\lfloor p(3 s)\rfloor$.

This means that the polynomial $p(x)=\frac{(x-1)(x-2)}{6}$ satisfies the required conditions.

Final answer: $p(x)=\frac{(x-1)(x-2)}{6}$