Ah, the crazy gifted 4 yr old boy who won't use the potty . . .all too familiar. My son was refusing to do #2 in the potty until several months past his 4th birthday, and had only decided to pee in the potty around 3.75. There really was not much we could do . . . we just went cold turkey and it took close to a week to get the pee in the toilet. He is now 6 and did make it through kindergarten with only one accident (though he still refuses to do anything other than pee at school). I laughed at the math incentive - the only way I can trim my son's fingernails is if I've given him a hard math problem to focus on while I'm clipping. It does get better, but as far as our experience goes, you might just have to wait until he's ready to manage that aspect of his life.
As far as school goes, DS was in daycare/preschool from the time he was a baby (half days) and really never socialized much with the other kids - and we were shocked when he finally started to during the second half of kindergarten and now in first grade is really well integrated into the classroom. It's a sort of gritty public school with a lot of kids with disadvantaged backgrounds, but there are a handful of high achievers as well - and they've been able to differentiate enough to keep him interested and challenged (at least in reading - I don't think he's really being challenged in math, but we're working on it.) Good luck!