# A property of ratio of two polynomials

I am given a function $f:\mathbb{R}\rightarrow \mathbb{R}$ such that $f(x)= \frac{p(x)}{q(x)}$ for all x, and $p(x),q(x)$ are two polynomials with integer coefficients. I have two questions related to it.

1. Suppose $f$ takes integer values on all integers. Then is $f$ itself a polynomial in rational coefficients?

2. If above answer is yes, then next question assumes that $p(x),q(x)$ have degree at most $d$. The function $f(x)= \frac{p(x)}{q(x)}$ must take integer values on how many integers, to ensure that it itself is a polynomial in rational coefficients?

• No way $f$ takes integer values on all integers if $q(x)$ does not divide $p(x)$ (use euclidean division). – Piquito May 1 '16 at 12:07
• $f(x)=\frac{p(x)}{q(x)}\implies$ that $q(x)$ is a factor of $p(x)$ – Simply Beautiful Art May 1 '16 at 12:21
• @piquito , so is it true that a ratio of two irreducible polynomials will take non-integer value at some point? – anurag anshu May 1 '16 at 12:59
• @Simple Art - I do not assume f to be a polynomial itself. Its just a function that takes integer values on integer points. – anurag anshu May 1 '16 at 12:59
• @anuraganshu Concerning piquito's comment, we have $p\in\mathbb{N}$ and $q\in\mathbb{N}$, which implies $f\in\mathbb{Q}$, so yes, eventually will get non-integer values at some point. Unless $q$ is a factor of $p$ – Simply Beautiful Art May 1 '16 at 13:26