The first digit says the type of card (Visa, MC, etc), the next 5 are who issued it, and the remainder are random-ish as they have to give a valid checksum when used in the Luhn algorithm (which basically takes every other number, multiplies it by 2, adds all of those and all the other numbers together, then sees if…