Solution (source code)

= Solution

For $k,n>0$, substitute $x'=\alpha x$, $t'=\beta t$, $u'=\gamma u$ and compare the two distinct right-hand terms. Invariance requires $\beta=\alpha^{2k+1}$ and $\gamma^n=\alpha^{-2k}$. Taking $\alpha=e^s$ gives the <Lie point symmetry>
$$
(x,t,u)\mapsto(e^sx,e^{(2k+1)s}t,e^{-2ks/n}u),\qquad D=x\partial_x+(2k+1)t\partial_t-\frac{2k}{n}u\partial_u.
$$
Translations in $x$ and $t$ are also <Lie point symmetries>, generated by $X=\partial_x$ and $T=\partial_t$. Direct differentiation gives
$$
[D,X]=-X,\qquad[D,T]=-(2k+1)T,\qquad[X,T]=0,
$$
so their span is a three-dimensional <Lie algebra>.

The printed nonnegative-integer range also includes cases where the generic scaling would divide by zero. If $k>0,n=0$, the equation is linear, $u_t=u_x+\partial_x^{2k+1}u$. Amplitude scaling $(x,t,u)\mapsto(x,t,e^su)$ is a symmetry, with $D=u\partial_u$. Along with $X,T$ all brackets are zero, giving an abelian three-dimensional <Lie algebra>. A nontrivial pure rescaling of space and time cannot preserve both derivative orders in this case.

If $k=0$, the equation becomes $u_t=(u^n+1)u_x$, including $u_t=2u_x$ when $n=0$. In either case choose $(x,t,u)\mapsto(e^sx,e^st,u)$, with $D=x\partial_x+t\partial_t$. Then $[D,X]=-X$, $[D,T]=-T$, and $[X,T]=0$. This covers every allowed pair $(k,n)$; when both vanish, there is also an independent amplitude scaling.