10 Security Features on Your Credit Cards, I particularly think this one is very helpful indeed:
"Checksum validation. All of the major credit cards follow a formula which helps separate real credit card numbers from fake ones. For Visa, MasterCard, and Discover cards: if you take the first and third digits in each group of four numbers, double them, add up the digits of the answers (so for 16: 1+6=7), then add them all up along with the "unused" digits in each of the groups, the answer will be divisible by 10. If it isn't, you have a fake credit card number."
"Checksum validation. All of the major credit cards follow a formula which helps separate real credit card numbers from fake ones. For Visa, MasterCard, and Discover cards: if you take the first and third digits in each group of four numbers, double them, add up the digits of the answers (so for 16: 1+6=7), then add them all up along with the "unused" digits in each of the groups, the answer will be divisible by 10. If it isn't, you have a fake credit card number."