Solution (source code)

= Solution

Interpret the otherwise undefined $b_k(t)$ here as the moment $\beta_k(t)$ defined above. For $k=1$, the process is $B_t$, and for $k=2$ it is $B_t^2-t$; both are <martingales>.

For $k\ge3$, the <Itô formula> and the derivative of the <Brownian moment recursion> yield
$$
d\big(B_t^k-\beta_k(t)\big)=kB_t^{k-1}\,dB_t+\frac{k(k-1)}2\big(B_t^{k-2}-\beta_{k-2}(t)\big)\,dt.
$$
The <stochastic integral> is a true <martingale> on finite horizons, since the required $2k-2$ moment is integrable in time. The continuous finite-variation term is not identically zero. If it were, its continuous derivative would vanish at every time, whereas at a fixed $t>0$, the nondegenerate Gaussian $B_t$ does not almost surely satisfy the polynomial equation $B_t^{k-2}=\beta_{k-2}(t)$. Uniqueness of <continuous semimartingale> decomposition therefore rules out even the <local martingale> property. Hence
$$
\boxed{B_t^k-\beta_k(t)\text{ is a martingale precisely for }k=1,2.}
$$
For example $\mathbb E(B_t^3\mid\mathcal F_s)=B_s^3+3(t-s)B_s$, so merely subtracting its zero expectation cannot make the cubic power a <martingale>. The <centered Brownian powers need not be martingales> distinction is resolved by subtracting the random drift compensator $k(k-1)\int_0^tB_s^{k-2}ds/2$ instead of the deterministic mean.