Yes, they've been in two games together so far: wikipedia:Mario & Sonic at the Olympic Games and wikipedia:Mario & Sonic at the Olympic Winter Games
|Includes CC-BY-SA content from Wikipedia's [[Wikipedia:|]] article (authors)|
As for a platformer game, no. They'd have to give Mario Sonic type abilities or give Sonic Mario type abilities, which would be a bad either way.
Besides it would feel too much like Mortal Kombat Vs DC Universe