Subfield: Number Theory


Question: Determine all positive integers $n$ for which there exists a polynomial $f(x)$ with real coefficients, with the following properties:



(1) for each integer $k$, the number $f(k)$ is an integer if and only if $k$ is not divisible by $n$;



(2) the degree of $f$ is less than $n$

Solution:
We will show that such polynomial exists if and only if $n=1$ or $n$ is a power of a prime.



We will use two known facts stated in Lemmata 1 and 2.



LEMMA 1. If $p^{a}$ is a power of a prime and $k$ is an integer, then $\frac{(k-1)(k-2) \ldots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right) !}$ is divisible by $p$ if and only if $k$ is not divisible by $p^{a}$.



Proof. First suppose that $p^{a} \mid k$ and consider



$$

\frac{(k-1)(k-2) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right) !}=\frac{k-1}{p^{a}-1} \cdot \frac{k-2}{p^{a}-2} \cdots \frac{k-p^{a}+1}{1} .

$$



In every fraction on the right-hand side, $p$ has the same maximal exponent in the numerator as in the denominator.

Therefore, the product (which is an integer) is not divisible by $p$.



Now suppose that $p^{a} \nmid k$. We have



$$

\frac{(k-1)(k-2) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right) !}=\frac{p^{a}}{k} \cdot \frac{k(k-1) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}\right) !} .

$$



The last fraction is an integer. In the fraction $\frac{p^{a}}{k}$, the denominator $k$ is not divisible by $p^{a}$.



LEMMA 2. If $g(x)$ is a polynomial with degree less than $n$ then



$$

\sum_{\ell=0}^{n}(-1)^{\ell}\left(\begin{array}{l}

n \\

\ell

\end{array}\right) g(x+n-\ell)=0

$$



Proof. Apply induction on $n$. For $n=1$ then $g(x)$ is a constant and



$$

\left(\begin{array}{l}

1 \\

0

\end{array}\right) g(x+1)-\left(\begin{array}{l}

1 \\

1

\end{array}\right) g(x)=g(x+1)-g(x)=0 .

$$



Now assume that $n>1$ and the Lemma holds for $n-1$. Let $h(x)=g(x+1)-g(x)$; the degree of $h$ is less than the degree of $g$, so the induction hypothesis applies for $g$ and $n-1$ :



$$

\begin{gathered}

\sum_{\ell=0}^{n-1}(-1)^{\ell}\left(\begin{array}{c}

n-1 \\

\ell

\end{array}\right) h(x+n-1-\ell)=0 \\

\sum_{\ell=0}^{n-1}(-1)^{\ell}\left(\begin{array}{c}

n-1 \\

\ell

\end{array}\right)(g(x+n-\ell)-g(x+n-1-\ell))=0 \\

\left(\begin{array}{c}

n-1 \\

0

\end{array}\right) g(x+n)+\sum_{\ell=1}^{n-1}(-1)^{\ell}\left(\left(\begin{array}{c}

n-1 \\

\ell-1

\end{array}\right)+\right. \\

\left.\left(\begin{array}{c}

n-1 \\

\ell

\end{array}\right)\right) g(x+n-\ell)-(-1)^{n-1}\left(\begin{array}{l}

n-1 \\

n-1

\end{array}\right) g(x)=0 \\

\sum_{\ell=0}^{n}(-1)^{\ell}\left(\begin{array}{l}

n \\

\ell

\end{array}\right) g(x+n-\ell)=0 .

\end{gathered}

$$



LEMmA 3. If $n$ has at least two distinct prime divisors then the greatest common divisor of $\left(\begin{array}{l}n \\ 1\end{array}\right),\left(\begin{array}{l}n \\ 2\end{array}\right), \ldots,\left(\begin{array}{c}n \\ n-1\end{array}\right)$ is 1 .



Proof. Suppose to the contrary that $p$ is a common prime divisor of $\left(\begin{array}{l}n \\ 1\end{array}\right), \ldots,\left(\begin{array}{c}n \\ n-1\end{array}\right)$. In particular, $p \mid\left(\begin{array}{l}n \\ 1\end{array}\right)=n$. Let $a$ be the exponent of $p$ in the prime factorization of $n$. Since $n$ has at least two prime divisors, we have $1<p^{a}<n$. Hence, $\left(\begin{array}{c}n \\ p^{a}-1\end{array}\right)$ and $\left(\begin{array}{c}n \\ p^{a}\end{array}\right)$ are listed among $\left(\begin{array}{l}n \\ 1\end{array}\right), \ldots,\left(\begin{array}{c}n \\ n-1\end{array}\right)$ and thus $p \mid\left(\begin{array}{c}n \\ p^{a}\end{array}\right)$ and $p \mid\left(\begin{array}{c}n \\ p^{a}-1\end{array}\right)$. But then $p$ divides $\left(\begin{array}{c}n \\ p^{a}\end{array}\right)-\left(\begin{array}{c}n \\ p^{a}-1\end{array}\right)=\left(\begin{array}{c}n-1 \\ p^{a}-1\end{array}\right)$, which contradicts Lemma 1.







Next we construct the polynomial $f(x)$ when $n=1$ or $n$ is a power of a prime.



For $n=1, f(x)=\frac{1}{2}$ is such a polynomial.



If $n=p^{a}$ where $p$ is a prime and $a$ is a positive integer then let



$$

f(x)=\frac{1}{p}\left(\begin{array}{c}

x-1 \\

p^{a}-1

\end{array}\right)=\frac{1}{p} \cdot \frac{(x-1)(x-2) \cdots\left(x-p^{a}+1\right)}{\left(p^{a}-1\right) !} .

$$



The degree of this polynomial is $p^{a}-1=n-1$.



The number $\frac{(k-1)(k-2) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right) !}$ is an integer for any integer $k$, and, by Lemma 1 , it is divisible by $p$ if and only if $k$ is not divisible by $p^{a}=n$.



Finally we prove that if $n$ has at least two prime divisors then no polynomial $f(x)$ satisfies $(1,2)$. Suppose that some polynomial $f(x)$ satisfies $(1,2)$, and apply Lemma 2 for $g=f$ and $x=-k$ where $1 \leq k \leq n-1$. We get that



$$

\left(\begin{array}{l}

n \\

k

\end{array}\right) f(0)=\sum_{0 \leq \ell \leq n, \ell \neq k}(-1)^{k-\ell}\left(\begin{array}{l}

n \\

\ell

\end{array}\right) f(-k+\ell)

$$



Since $f(-k), \ldots, f(-1)$ and $f(1), \ldots, f(n-k)$ are all integers, we conclude that $\left(\begin{array}{l}n \\ k\end{array}\right) f(0)$ is an integer for every $1 \leq k \leq n-1$.



By dint of Lemma 3, the greatest common divisor of $\left(\begin{array}{l}n \\ 1\end{array}\right),\left(\begin{array}{l}n \\ 2\end{array}\right), \ldots,\left(\begin{array}{c}n \\ n-1\end{array}\right)$ is 1 . Hence, there will exist some integers $u_{1}, u_{2}, \ldots, u_{n-1}$ for which $u_{1}\left(\begin{array}{l}n \\ 1\end{array}\right)+\cdots+u_{n-1}\left(\begin{array}{c}n \\ n-1\end{array}\right)=1$. Then



$$

f(0)=\left(\sum_{k=1}^{n-1} u_{k}\left(\begin{array}{l}

n \\

k

\end{array}\right)\right) f(0)=\sum_{k=1}^{n-1} u_{k}\left(\begin{array}{l}

n \\

k

\end{array}\right) f(0)

$$



is a sum of integers. This contradicts the fact that $f(0)$ is not an integer. So such polynomial $f(x)$ does not exist.
We claim the answer is $n=p^{\alpha}$ for some prime $p$ and nonnegative $\alpha$.



LEMMA. For every integers $a_{1}, \ldots, a_{n}$ there exists an integervalued polynomial $P(x)$ of degree $<n$ such that $P(k)=a_{k}$ for all $1 \leq k \leq n$.



Proof. Induction on $n$. For the base case $n=1$ one may set $P(x)=a_{1}$. For the induction step, suppose that the polynomial $P_{1}(x)$ satisfies the desired property for all $1 \leq k \leq n-1$. Then set $P(x)=P_{1}(x)+\left(a_{n}-P_{1}(n)\right)\left(\begin{array}{l}x-1 \\ n-1\end{array}\right)$; since $\left(\begin{array}{l}k-1 \\ n-1\end{array}\right)=0$ for $1 \leq k \leq n-1$ and $\left(\begin{array}{l}n-1 \\ n-1\end{array}\right)=1$, the polynomial $P(x)$ is a sought one.



Now, if for some $n$ there exists some polynomial $f(x)$ satisfying the problem conditions, one may choose some integer-valued polynomial $P(x)$ (of degree $<n-1$ ) coinciding with $f(x)$ at points $1, \ldots, n-1$. The difference $f_{1}(x)=$ $f(x)-P(x)$ also satisfies the problem conditions, therefore we may restrict ourselves to the polynomials vanishing at points $1, \ldots, n-1-$ that are, the polynomials of the form $f(x)=c \prod_{i=1}^{n-1}(x-i)$ for some (surely rational) constant $c$.

Let $c=p / q$ be its irreducible form, and $q=\prod_{j=1}^{d} p_{j}^{\alpha_{j}}$ be the prime decomposition of the denominator.



1. Assume that a desired polynomial $f(x)$ exists. Since $f(0)$ is not an integer, we have $q \nmid(-1)^{n-1}(n-1)$ ! and hence $p_{j}^{\alpha_{j}} \nmid(-1)^{n-1}(n-1)$ ! for some $j$. Hence



$$

\prod_{i=1}^{n-1}\left(p_{j}^{\alpha_{j}}-i\right) \equiv(-1)^{n-1}(n-1) ! \not \equiv 0 \quad\left(\bmod p_{j}^{\alpha_{j}}\right)

$$



therefore $f\left(p_{i}^{\alpha_{i}}\right)$ is not integer, too. By the condition (i), this means that $n \mid p_{i}^{\alpha_{i}}$, and hence $n$ should be a power of a prime.



2. Now let us construct a desired polynomial $f(x)$ for any power of a prime $n=p^{\alpha}$. We claim that the polynomial



$$

f(x)=\frac{1}{p}\left(\begin{array}{l}

x-1 \\

n-1

\end{array}\right)=\frac{n}{p x}\left(\begin{array}{l}

x \\

n

\end{array}\right)

$$



fits. Actually, consider some integer $x$. From the first representation, the denominator of the irreducible form of $f(x)$ may be 1 or $p$ only. If $p^{\alpha} \nmid x$, then the prime decomposition of the fraction $n /(p x)$ contains $p$ with a nonnegative exponent; hence $f(x)$ is integer. On the other hand, if $n=p^{\alpha} \mid x$, then the numbers $x-1, x-2, \ldots, x-(n-1)$ contain the same exponents of primes as the numbers $n-1, n-2, \ldots, 1$ respectively; hence the number



$$

\left(\begin{array}{l}

x-1 \\

n-1

\end{array}\right)=\frac{\prod_{i=1}^{n-1}(x-i)}{\prod_{i=1}^{n-1}(n-i)}

$$



is not divisible by $p$. Thus $f(x)$ is not an integer.

Final answer: $n=p^{\alpha}$ for some prime $p$ and nonnegative $\alpha$