Quantum thermodynamic functions for an oscillator coupled to a heat bath