This site explains how the UK car registration number system works – it was changed in 2001.
Briefly: the first two letters are a ‘local memory tag’, the 51 indicates the age (changes every six months), and the last three letters are random letters.
(Information via an ITI members’ mailing list)