Although M is a consonant, we pronounce MP3 as the letters M (em) and P (pee) and the number three. Because the letter M’s pronunciation starts with a vowel sound, we use the preposition that precedes vowels, an.
Things used to be simpler. An came to us in from the Old English word for one, ān. Back in the day, people used an along with any single noun. So, just as you see in dramatic (or comedic) representations of medieval speech, people really would say things like “Fetch me an flagon o’ rum — I’ve an toothache that would make the very devil cry like an babe.”
Then somewhere around the 15th century, people combined an and the word it referred to as one. So you would have, for example, anapron meaning one napron. (OFr naperon, from Latin mappa, a table napkin).
Then, not too long after that, consensus was that the words should be separated again. However, somewhere between the swings and the roundabouts, there was some uncertainty as to how the words were to be split and lots of words ended up with an extra consonant on the front or missing one that they’d originally had.
An napron became an apron.
An Annie goat became a nanny goat.
An ewt became a newt.
An ekename became a nickname.
When the n of an is added to the new word, that change is known as provection. But that word only refers to those cases. In 1914, grammarian Otto Jespersen coined the term metanalysis to refer to the process that leads to either an N added to the new word or taken away. Jeff Aronson writes more about these word changes here. (Free registration is required.)
Follow us on Twitter @tao_of_grammar