This week, Ariana Grande’s “7 Rings” hit No. 1 on Billboard’s singles chart for the sixth time, the latest victory for a song that broke records when it was released in January and has since been streamed more than a billion times around the world.

But when it comes to royalties for “7 Rings,” the biggest winner may be two songwriters who died decades ago: Rodgers and Hammerstein.

Ms. Grande’s song is an extended reinterpretation of “My Favorite Things” from “The Sound of Music,” with Ms. Grande changing the original’s lyrics about innocent joys — “raindrops on roses and whiskers on kittens” — to an anthem of empowerment through conspicuous consumption. “Breakfast at Tiffany’s and bottles of bubbles,” she sings, over a bass-heavy beat. “Buy myself all of my favorite things.”

The song is credited to a total of 10 writers. But two of them — Richard Rodgers and Oscar Hammerstein II — control 90 percent of the songwriting royalties, a remarkable split that reflects the value of evergreen song catalogs, and of the negotiating leverage their owners have when pop stars come seeking permission.