We give a representation of the solution for the best approximation of the harmonic oscillator equation formulated in a general Banach space setting, and a characterization of l p -maximal regularity—or well posedness—solely in terms of R -boundedness properties of the resolvent operator involved in the equation.