Most of you probably hate me for saying this but, Sonic does not copy Mario. I will look at both sides of the argument. No bias.
Sonic: Run through levels to collect rings and chaos emeralds. fight a boss after every level.
Mario: Run through levels to collect rings. fight a boss in a set amount of levels.
the rings could be considered copying but the ways in which they are used are completely different. Mario's coins are used as score and extra life. Sonic's rings, are used as his "health". as for running from one side of the level to another, Mario is based mostly on jumping, while sonic is known, of course, for speed(I have yet to see a loop in a mario game). Also Sonic follows more of a continuing story, adding more characters along the way. Mario follows no real story and can in fact be played in almost any order and still be correct. And the chaos emeralds obviously have no basis in mario. mario's powerups are completely different than sonic's(save invincibility, which I'll admit seems a little uncanny).
There are similarities however, and they are somewhat strange. one example is tails power of flight. he flies by whirling his tails together. Mario does similarly with his raccoon(or tanooki) suit. as mentioned above, the invincibility is very similar, however the sparkeling stars seen in Super Mario world came AFTER the first sonic game to use them(sonic 1). so if anyone is being copied in that respect,it is sonic. I will say, though, that everything else about their invincibilities are very much alike. Mario has many roots in japanese mythology. Tails also, is rumored to be an animal from such mythology(the name of the animal, I cannot remember, dangit).
With that, I conclude that noone copied Mario or sonic, except each other.
Can''t hold on much longe. But I will never let go.