Enumerate the rationals as $b_1,b_2,\dots$ and define the (set) function: $$f(x) = (x-b_1)^2 + (x-b_1)^2(x-b_2)^2 + \dots.$$ At any particular $x$, only finitely many terms are non zero so this is perfectly well defined as a (set) function but surely, it is not equal to any polynomial! (or is it?) How do I show that there is no polynomial $p(t) \in \mathbb Q[t]$ such that $p(x) = f(x)$ for all $x \in \mathbb Q$?

If $f(x)$ were defined as $(x-b_1) + (x-b_1)(x-b_2) + \dots$, then this question is not so hard. If $p(x)$ has degree $n$, then testing on $b_1,\dots,b_n$ would show that $p(x)$ is necessarily $(x-b_1) + (x-b_1)(x-b_2) + \dots + (x-b_1)\dots(x-b_n)$ but then $x=b_{n+1}$ derives a contradiction.

I don't know how to adapt this approach. Trying to guess the polynomial seems hard even if we think $p(x)$ is degree $1$.

I posted a follow up to this question here: (Variation of an old question) Are these functions polynomials?.

any$\mathcal{O}$ and $p(t)\in\Bbb Q[t]$ for which $p(x) = f(x)$ for all rational $x$. $\endgroup$ – Mark Fischler Dec 11 '17 at 19:27polynomial$p/(x - b_1)$ has a root. That is, we can divide $f$ by $x - b_1$ 'canonically' to obtain a function $g$ (EDIT: oops, sorry, not your $g$), and we can divide $p$ by $x - b_1$ canonically to obtain a polynomial $q$, but it isn'ta prioriclear to me that $g = q$ (in other words, that these two kinds of division preserve equality). $\endgroup$ – LSpice Dec 11 '17 at 23:524more comments