FAILURE MAP
← Case archive

FA-72707 / Check-digit algorithms / Member archive

Luhn mod N folds addends in base ten · case 02

Codes containing letters in doubled positions receive the wrong check character.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Luhn mod N check-character generation over the base-36 alphabet 0-9a-z (input is lower-cased; empty input or any other character returns None). From the rightmost payload character the factor alternates 2,1,2,...; each addend factor * codepoint is folded as addend // 36 + addend % 36; the check is the alphabet character at (36 - sum % 36) % 36.

Why this case matters

Voucher and licence-key systems protect alphanumeric codes with Luhn mod N check characters.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression ["i3wknpx64b"]"l""a"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 ↗