Smarter number generation