I recently heard a powerful guitar piece, Giuliani's "Grand Overture", and as I was listening to it I was sure I had heard it before or that it was a variation or transcription of a Beethoven Piano Sonata. Maybe the 3rd, first movement, but not sure. Something later. All I know is that I had never heard Giuliani's piece and yet I was singing along with the entire piece, anticipating all of the changes and even the harmony. I then read that Giuliani used to send his works to Beethoven. I'm thinking of one sonata, but maybe it's a mix of several.

Same thing happened when I heard Scarlatti's sonata K525 for the first time: it contains the essentials and overall form of Beethoven's 2nd movement, 9th symphony.

I am not looking to denigrate Giuliani or Beethoven, I find the whole question of influence and similarity really interesting, and so if anyone has any information on this Giuliani / Beethoven similarity, please share.