its not just an stupid random number .It contains a lot of info and have 100s of websites explaining it .to sum it up quickly we can say it uses the popular LUHN algorithm to check if its correct or not along with the FAC CODES for the maker
One way to generate a valid IMEI number is to enter numbers into this website until they generate the type of cellphone you want to emulate
International Numbering Plans, © 2001-2012