The melody in Niccolò Paganini's 24th Caprice is one of the best-known melodies of all time, with many subsequent composers writing variations on it. Paganini (1782-1840) was the preeminent violinist of his era and perhaps any era, popularizing innovative techniques for the instrument that have now become standard. His 24 Caprices for Solo Violin are legendary for their difficulty, but Jascha Heifetz appears to play the final Caprice with ease:
Perhaps the most famous set of variations on this theme was composed by Sergei Rachmaninov in his Rhapsody on a Theme by Paganini, one of my personal favourites:
A more recent interpretation of the 24th Caprice is by Turkish composer and pianist Fazil Say, who brilliantly puts a jazz spin on it. Very impressive!
Did Paganini originate this famous tune? I don't know. Some 30 years ago I heard a set of Paganini variations played on the radio, and the announcer insisted that it was based on a Franconian folk song. I've never come across this attribution since, so I have reason to doubt its veracity. Nevertheless, whoever first came up with it wrote an enduring melody that has fascinated composers and musicians for nearly two centuries.
One final thing: A few years ago I began composing my own variations on Paganini, using some of the asymmetrical metres found in Balkan folk music. I cannot claim this unfinished work will ever be the equal of those of Paganini himself, Rachmaninov or Say, but it does provide a bit of harmless diversion on a slow day.