According to https://en.bitcoin.it/wiki/Wallet_import_format, the bitcoin private wif format key is create by below step. And it says that the compressed wif key always start with 'K' or 'L', this mean 80+private-key+01/ mod 58' last result is always 18 or 19. I know the big number mod 58 will result in 0-57, why the last remainder of wif key mod 58 always is 18 or 19 Would someone give me Mathematical Proof of this?
#1 take a private key
priv='d7c9e36a4d31039d4b94a43246a4a5f0767f2f55ef9a359901c82c41fb1e4bff'
compressed='01'
#2 add version
version='80' #mainnet
priv=version+priv+compressed
#3 perform double hash-256 of priv in step#2
checksum=dhash256(priv.decode('hex'))
#4 get first 4 bytes for checksum
checksum=checksum.encode('hex')[0:8]
#5 add checksum to priv in step#2
wifhash=priv+checksum
#6 final bash58encode
wif= b58encode(wifhash.decode('hex'))
# compressed --> K or L
print wif
#compressed: L4TB9Z3dXeKW4tyF7EVqbczrEA5hjSdjG1QvBd1CeYTQHm2YincA