Technical analysis of music, like this one I happened to check out just an hour ago, spend so much time considering our own personal reactions to compositions, things like tension and expectation and payoff and call-and-response invitations to participate..
It makes me think that it's not so much recognizing the music itself or any math therein, but rather the pattern of our own responses.
Even with different tempos and such, we still recall the pattern, the order of our own reactions, and that leads us to [hopefully] recall the song on the tip of our tongue.