Non-spurious harmonic oscillator states with arbitrary symmetry