On a v1 you'll just need to have a Tamagotchi on an odd-numbered generation (1, 3, 5, etc.) and treat it perfectly, never (or rarely) letting it drop more than one hunger or happiness hearts. Don't worry about being too perfect as there have been times I've let two hearts drop several times throughout its lifetime and I still got Mametchi.
On a v2 or v3 you will have to do the same thing, but with some luck. You might get another top-tier character.
On a v4, you will have to have a male character in the Mame family and raise its Intelligence points higher than its Style or its Kindness points. What really stinks is that I really want a male character in the Mame family, for Tensaitchi, but I've NEVER GOTTEN ONE.
On a v4.5, you will have to have a male character. Treat it perfectly but never play games and don't raise its skill points at all. I think you should get Mametchi this way.