Here in Sweden the personal number starts with your birthday, then a serial number and finally a checksum that also indicates your gender.
If you have an even checksum digit, that indicates that you are a woman, if you have an odd checksum digit, that indicates that you are a man.
Here you can find more information: https://en.wikipedia.org/wiki/Personal_identity_number_(Sweden)