Almost! The public key is hashed again using SHA-256 and then the first 8 bytes of the hash are reversed. The account ID is then the decimal representation of those 8 bytes.
Ok, thanks. I have my code working.
Please explain what "BIP39" means? If I generate my own accounts from random character strings, will this cause any issue? What are the limitations enforced by BIP39?