Luhn algorithm is a very simple checksum formula to validate numbers (credit cards, IMEI...).
You take one number, compute a check digit and add it to the end.
It is not secure at all but easy to implement. Here is one
https://en.wikipedia.org/wiki/Luhn_algorithm