Classical and quantum oscillators of sextic and octic anharmonicities