The anharmonic oscillator problem: a new algebraic solution