>>24950078The first is correct. The distinction between a/an is a spoken one, not a literary one. The idea is to separate vowel sounds with "an" and constanat sounds with "a."
Unfortunately some children didn't understand that in school and only took away the way words are spelt dictates usage.