Public Witch Reference Number

The Public Witch Reference Number is a 10- or 11-character, alphanumeric code that identifies many witch characters that are part of the LDB Database. This identification system was created by LDB Group in 31 October 2002.

Structure
The Public Witch Reference Number contains a 9-digit unique identifier, a checksum letter and a second letter (no second letter for witch characters created in 19th century, 'W' for witch characters created in 20th century and 'A' or 'H' for witch characters created in 21st century - 'A' for scary witch, 'H' for a non-scary witch). The example format is: 123456789ZA.

Checksum letter
A checksum letter is used for error detection when someone wants to find a Public Witch Reference Number online. It is based on modulus 26, and the weighting is 1, 2, 3, 4, 5, 6, 7, 8, 9, _, 1.

The letter in the 11th position is converted from a letter to a number based on the position of the alphabet: 'A' = 1, 'B' = 2, 'C' = 3, etc. A 'W' or nothing in position 11 indicates a numeric value of zero.

Example 1
Generating checksum for 415972366_A:

All products of the individual digits sum up to 227.

To find the check character, use the divisor of 26 and do the long division or modulo operation between the sum and the divisor of 26. The remainder will indicate the letter position in the English alphabet.

For example, we use long division to divide 227 by 26 to give the checksum letter:   8 --> 1 26)227   208 --> 2    19 --> 3 / remainder The solution for long division of 227 ÷ 26 is 8 with remainder of 19, and 'S' is the 19th letter of the alphabet. Thus the correct Public Witch Reference Number is 415972366SA.
 * 1) Divide 227 by 26 to get 8.
 * 2) Multiply the quotient digit (8) by the divisor 26.
 * 3) Subtract 208 from 227.