Part A: we construct a polynomial that's a linear combination of polynomials that act like indicator functions
Consider the following polynomials.
- $B_1(x) = x$ sends $1$ to $1$ and fixes the integers.
- $B_2(x) = \frac{1}{2}x(x-1)$ sends $2$ to $1$ and fixes the integers.
- $B_3(x) = \frac{1}{6}x(x-1)(x-2)$ sends $3$ to $1$ and fixes the integers.
As proof that the values of $B_n$ are integers, we note that they are binomial coefficients when evaluated at $x \le n$ and $0$ when $0 \le x < n$.
In general, let $B_i(x)$ be $\frac{1}{i!}\prod_{0 \le k < i} (x-k)$.
Additionally, let $B_0(x) = 1$ and $B_{-n}(x) = B_n(-x)$.
Armed with this, let's define:
$F_{ab}$ as a function which sends $a$ to $0$ and $b$ to $1$, and is undefined when $a = b$.
$F_{ab}(x)$ is $B_{b-a}(x-a)$.
Now let's define $Q_{(\vec{a}, i)}$ which sends $a_i$ to $1$ and everything else to $0$.
$$ Q_{(\vec{a}, i)} = \prod_{j \neq i} F_{\vec{a}_j\vec{a}_i}(x) $$
So now let's define $P_{(\vec{a},\vec{b})}$ which sends $\vec{a}$ to $\vec{b}$.
$$ P(\vec{a}, \vec{b}) = \sum_{i} \vec{b}_i Q_{(\vec{a}, i)} $$
Part B: We show that the sequence $B_1, B_2, \cdots$ cannot be part of any finitely generated subring.
First, we have the degree of a polynomial $p(x)$, which is defined standardly.
Next, we have what I will nonstandardly call the codegree.
Let the codegree of a rational number $p/q$ be the number of distinct prime factors of $q$ when written in simplest form.
The codegree of an integer is defined to be zero.
Let the codegree of a polynomial with rational coefficients $p(x)$ be maximum codegree of any of its coefficients.
I claim that any finitely generated subring of $\mathbb{Q}[x]$ will have a universal bound on its codegree.
Let $T$ be a finitely generated subring of $\mathbb{Q}[x]$ generated by the finite set $G$.
Let $u$ be the sum of all codegrees of all coefficients of all elements of $G$. This is a conservative bound; sharper bounds are probably possible.
$u$ bounds the codegree of any element of $T$, since prime factors cannot appear in any coefficient of any polynomial of $S$ unless that prime factor was present in one of the coefficients of one of the generators in $G$.
Now, let's suppose $S$, the ring of polynomials with rational coefficients that fix the integers setwise, is generated by some finite set of polynomials with rational coefficients $H$. Note that all $B_i$ must be in $S$.
Let $v$ be the sum of the codegrees of all coefficients of elements of $H$.
Let $r$ be the $v+1$st prime.
The polynomial $B_r$ contains $\frac{1}{r!}$ as a coefficient. Therefore $B_r$ has codegree greater than or equal to $v+1$.
Therefore $B_r$ is not in $S$, which is a contradiction.