Random math bits and pieces. No specific purpose, mostly just routines for solving projecteuler.net.