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?.