Harmonic oscillator representation for anharmonic vibrational wavefunctions