FA-72587 / Check-digit algorithms / Member archive
Resident ID maps the remainder straight to a digit · case 02
Check characters are wrong for all remainders except 10-to-X style coincidences.
Case contract
Check character of an 18-character resident identity number: seventeen ASCII digits followed by a digit or X (lowercase x accepted). Weights are 2^(17-i) mod 11 for 0-based i; the check character is "10X98765432"[sum % 11]. Return [check character, whether the 18th character matches case-insensitively].
Why this case matters
Account opening flows validate national identity numbers before identity verification.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["445793197510028320"] | ["2", false] | ["X", false] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗