If $K$ is a field, any non-zero ideal in the ring of formal power series $A=K[[X]]$ is of the form $AX^n$ with $n\geq 0$, so $A=K[[X]]$ is a principal ideal ring.
I can't see why. Usually when we consider the ring of polynomials $B=K[X]$, the ideals are the multiples of any fixed polynomial $P(x)\in K[X]$.
Here, for formal power series, why can we restrict it to $AX^n$?