Exact needs for mandarins isn't x gallons in a tank at least y years old. It is more complex than that. The bigger, older, and more diverse reef tank with lots of rock, the more likely it is to survive. I got one or two at the shop I was running to eat pellets, but effectively none are like this (unless you get the captive bred ones which eat NLS, if those are even on the market yet).
The other issue is that many people think they succeeded because their mandarin lived for six months or even a year, but that is not their natural lifespan. In this hobby success with some species is a relative term.
Competition can also be really bad with mandarins, they will lose. One other tankmate that eats the same food can turn a great tank for a mandarin into a desert.
Some 40 gallons can handle a mandarin, some 100 gallons can't. Every tank and every mandarin is different.