Marvin Hamlisch, who died Aug. 6 in Los Angeles at age 68, leaves behind a chart legacy on the Billboard Hot 100 that stretches more than 45 years.

The New York-born composer was just 19 years old when Lesley Gore's recording of "Sunshine, Lollipops and Rainbows," written by Hamlisch and Howard Lieblin, appeared on "Lesley Gore Sings of Mixed-Up Hearts," which debuted on the Billboard 200 in January 1964 and peaked at No. 125. It took another year and a new, poppier recording of the song to break it as a hit that peaked at No. 13 on the Billboard Hot 100 in August 1965.

His biggest single was his collaboration with lyricists Alan & Marilyn Bergman for Barbra Streisand's "The Way We Were." The title track to the diva's film ruled for three weeks in 1974. That same year, he made his only Hot 100 appearance as an artist-ironically, with a song he didn't write. Hamlisch composed the music for the film "The Sting," and MCA issued his version of Scott Joplin's 1902 composition "The Entertainer" as a single. It spent two weeks at No. 3 in May 1974.

Hamlisch's top 10 tally includes Carly Simon's "Nobody Does It Better," from the 1977 James Bond film "The Spy Who Loved Me," and Lauryn Hill's "Ex-Factor." The latter sampled Wu-Tang Clan's "Can It All Be So Simple," which in turn sampled Gladys Knight's cover of "The Way We Were."