FA-72360 / Check-digit algorithms / Member archive
Luhn gate admits a lone check digit · case 05
A single "0" is accepted as a valid account number.
Case contract
Input a card-style number that may contain spaces or hyphens as group separators. After removing them the text must be 2..19 ASCII digits, otherwise "malformed". Doubling applies to every second digit counting from the rightmost (check) digit, doubled values above 9 lose 9, and the number is "valid" when the sum is a multiple of 10, else "invalid".
Why this case matters
Payment-card, loyalty and account numbers are screened with the Luhn mod-10 check before any lookup.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["0"] | "valid" | "malformed" | 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 ↗