News for hackers. Stuff that matters.
Re:Find SF parking cops by xvedejas on Tuesday September 23, 2025 @08:02PM (#45354473)
In college we discovered everyone's ID number was evenly divisible by 13. Presumably it's because that's the smallest number you'd need so that you could detect any one digit being incorrect, or two adjacent digits being swapped (I think?). Or that it's just very easy to implement the increment when assigning new numbers.
Re:Find SF parking cops by nielsole on Tuesday September 23, 2025 @09:25PM (#45355121)
Isn't 11 the smallest divisor that gives those guarantees?
Re:Find SF parking cops by consp on Wednesday September 24, 2025 @03:44AM (#45357454)
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.

Re:Find SF parking cops by andruby on Wednesday September 24, 2025 @03:56AM (#45357535)
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