Is there a function $g$ such that $\int_0^1 x^n g(x) \, \mathrm d x$ is $1$ if $n=0$ and $0$ for $n \in \mathbb N_{\ge 1}$? Is there a function $g:[0,1]\to \mathbb R$ such that $$\int_0^1 x^n g(x) \, \mathrm d x$$ is equal to $1$ if $n=0$ and equal to $0$ for $n=1,2,3, \ldots$ ?
If there is, what would be an example of such a function? What if we require that $g$ be continuous?
I know I am expected to state what I have tried but I am honestly stuck. I wanted to integrate by parts but given that $g$ is not differentiable, this is rather useless, I think. Hints would be appreciated too.

Assuming $g\in L^2(0,1)$ we are allowed to write
$$ g(x) \stackrel{L^2}{=} \sum_{n\geq 0} c_n P_n(2x-1),\qquad c_n=(2n+1)\int_{0}^{1}g(x)P_n(2x-1)\,dx.$$
Our constraints give $c_0=1$ and
$$ c_n = (2n+1)\int_{0}^{1}g(x)\left[(-1)^n+x q_n(x)\right]\,dx = (-1)^n (2n+1) $$
so, formally,
$$ g(x) \stackrel{L^2}{=}\sum_{n\geq 0}(-1)^n (2n+1) P_n(2x-1) $$
but the RHS of the last line is not a square-integrable function over $(0,1)$:
$$ \int_{0}^{1}\left[\sum_{n\geq 0}(-1)^n (2n+1) P_n(2x-1)\right]^2\,dx = \sum_{n\geq 0}\frac{1}{2n+1}=+\infty $$
so there are no solutions in $L^2(0,1)$. A fortiori, no continuous solutions.
