First of all, no offense, but the code is quite horrible. It's mixed C with C++, missing indentation and, you know, I never knew 9 and 15 and 25 were prime numbers. You claim the algorithm is better than mersenne twister, but I doubt that. I'll try to find out what the cycle is. However, what good is a pseudo random number generator when you can't seed? Any value coming from it will be predictable, by simply re-running the sequence. And, as stated, your algorithm is horribly slow.
How secure really is your algorithm? Did you make it up yourself? Because my bet is: nowhere near as secure as mersenne twisters.
Also, if you like secure random numbers, how come you do advies to use "% 31"? Not really secure, is it?
Edit: Ok, analysing it, it won't repeat anytime soon, no . So security wise, should a proper seed be added, this may be OK. Even though I don't know enough to compare its security with mersenne twister.