Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't 11 the smallest divisor that gives those guarantees?


It's what quite a few banks used to use as a check digit, maybe that where you remember it from. But it depends on the size of the number you want to verify and exactly what system is employed. Lots of banks used 9 or 10 digit numbers which worked with a "11 check". Nine was also often used on smaller numbers.

You can use any prime afaik for this example but your number space will be limited.


For 2 digit checks it's often mod 97 (largest prime < 100) because it can detect all single-digit errors and most adjacent digit transpositions.

Used in IBAN bank account numbers, EU VAT numbers (UK, FR, BE), etc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: