The character of Ted Baxter was openly patterned after the character Oscar North -- an egotistical actor in the 1967 series He & She (1967) (for which series creator, Leonard Stern, gave permission). Oscar was played by Jack Cassidy, who plays Ted's brother here.
The role of Ted Baxter was originally based upon (and offered to) Jack Cassidy who turned it down, not wanting to commit full time to a series and fearing the role might typecast him.
The music that plays on Mary's hi-fi while Ted "overstays his welcome" is the same music used during the Mary-Bess shopping montage in the episode Bess, You Is My Daughter Now (1970).