LH PKNumber Control Code
Enter Your Personnel No.
Your ControlLetter will be computed.
E. g., my personnel number is 5111 and the Letter is 'D'.
Description
The controlcodes 'ABCDEFGHIK' are mapped to the numbers 09
in the way:
A=1, B=2, C=3, D=4, E=5, F=6, G=7, H=8, I=9, K=0.
The control equation Lufthansa uses is the 137code:
a_{1} + 3*a_{2} + 7*a_{3} + a_{4} + 3*a_{5} + 7*a_{6} + a_{7} = 0 (modulo 10)
So my number 005111 D has (a_{1},...,a_{7})=(0,0,5,1,1,1,4)
which satisfies the equation.
When I joined the company, I calculated the equation from
the numbers of some collegues assuming a modulo 10 code.
As I saw the 137 pattern I knew I was correct. I was worried
about the number of one person, as it does not fit. But
it turns out that his number (equal his account) had been
typed in wrong.
References

J. A. Gallian,
Error Detection Methods,
ACM Computing Surveys, 28:3 (Sept. 1996) 504517

J. A. Gallian, ST. Winters,
Modular Arithmetic in the Marketplace,
American Mathematical Monthly 95:6 (1988) 548551

Joerg Michael,
Mit Sicherheit, Pruefziffernverfahren auf ModuloBasis,
c't (Juli 1996) Heft 7, Seite 264

W. Press, S. Teukolsky, W. Vetterling, B. Flannery,
Numerical Recipes in C,
The Art of Scientific Computing (Second Edition)
http://nr.harvard.edu/nr/bookc.html (Online Version)
20.3 Cyclic Redundancy and Other Checksums 896903

RalphHardo Schulz,
Codierungstheorie,
VIEWEG VERLAG, 1991, ISBN: 3528064196
Sources
How looks such a simple equation in your favorit script language?
I tried some. The filter variants are reading lines from stdin and
assume that the first word is a pknumber.
Torsten Sillke