A playful 1976 country hit gave one star his fifth No. 1, but its songwriter had already written for music legends.