6

Let $k>0$ be an integer, Do there exist polynomials with rational coefficients such that a) for each positive integer input not equal to $k$ we output an integer, and b) for input $k$ we do not output an integer? I am guessing that this is impossible, could someone nudge me in the right direction?

2 Answers2

9

If a polynomial of degree $n$ takes integer values at $n+1$ consecutive integer argument, then it takes integer values at all integer arguments. This comes from the formula $$\sum_{k=0}^{n+1}(-1)^k \binom{n+1}k f(x+k)=0\tag1$$ valid for polynomials of degree $\le n$. (And $(1)$ comes from the "calculus of finite differences".)

ADDED IN EDIT

For amusement, here is an alternative "mathematics made difficult" argument for the original question. Let $f$ be a polynomial with rational coefficients taking integer values on $\Bbb Z-\{k\}$. Let $p$ be prime. Then $f$ is continuous map from $\Bbb Z_p$ (the $p$-adic integers) to $\Bbb Q_p$ (the $p$-adic numbers). Then $f(\Bbb Z-\{k\})\subseteq \Bbb Z_p$. The closure of $\Bbb Z-\{k\}$ in $\Bbb Q_p$ is $\Bbb Z_p$ and $\Bbb Z_p$ is closed in $\Bbb Q_p$. By continuity, $f(\Bbb Z_p)\subseteq\Bbb Z_p$. In particular $f(k)\in\Bbb Z_p$. As $f(k)\in\Bbb Q$ and $f(k)\in \Bbb Z_p$ for all $p$ then $f(k)\in\Bbb Z$.

Angina Seng
  • 158,341
  • 2
    @QiaochuYuan That's not true: $x/2$ takes integer values at infinitely many integers, but not at all integers. – Angina Seng Dec 31 '17 at 21:06
  • Oh, hmm, you're right. We need some additional constraint on something like the gcd of the differences. – Qiaochu Yuan Dec 31 '17 at 21:23
  • Two questions: what is the name of the formula in eq 1 (link please so i can read more about it), and how did you conclude that f(x) takes integer values at all integer arguments from eq 1? – user517635 Dec 31 '17 at 21:25
  • Actually, I think I understand now. Could this work for many integers, not just one $k$? – user517635 Dec 31 '17 at 22:16
1

The following can probably be connected to the "calculus of finite differences" mentioned in another answer.

Let's assume such a polynomial $f_0(x)$ exists, its degree is $n$. The conditions in question are stronger, but only this weaker property is relevant to us:

$$\exists_{k \in \Bbb Z} ((f_0(k) \notin \Bbb Z) \land \forall_{m \in \Bbb N_+} (f_0(k+m) \in \Bbb Z))$$

Now we define $$f_1(x) \equiv f_0(x+1)-f_0(x)$$

Taylor's theorem allows us to expand like this:

$$f_0(x+1) \equiv f_0(x)+ \frac {f_0'(x)}{1!}1+ \frac {f_0''(x)}{2!}1^2 + …$$

and because $f_0$ is a polynomial, the number of addends is finite. Now we have:

$$f_1(x) \equiv f_0'(x)+ \frac {f_0''(x)}2 + …$$

Analyze the degrees of particular addends and you will see that the degree of $f_1(x)$ is $(n-1)$.

Next take the relevant property of $f_0$ and think what it says about $f_1$ (treated as a difference between numbers). While calculating $f_1(k)$ we subtract non-integer from integer, we get a non-integer; to get $f_1(k+m)$ we subtract integer from integer, we get an integer. The conclusion is: $f_1$ has the same property as $f_0$.

Starting from a polynomial of degree $n$ we have found a polynomial of degree $(n-1)$ that has the same relevant property. We can iterate the procedure down to a polynomial of degree $0$ (i.e. a number, a constant function) that has the same property.

But obviously no constant function can yield a non-integer for one argument and an integer for another argument. Our assumption cannot be true then.