The two indefinite articles a and an are used with singular nouns when the noun is general. They refer to nouns which are non-specific (i.e. not definite). In other words, they refer to a particular thing that is not specifically known to the person who is making reference to that noun.

ii) words beginning with eu such as eulogy and euphonium, used a before it.
On the other hand, you should use the word “an” before all vowel sounds. These are words which start with the letters a, e, i, o and u. Some examples are: an entry, an hour, an apricot, unbeliever, an orange, an ape, an unusual problem, an odor, an eye, an idea, an eagle, an orbit, an honor, an umbrella, an elephant and so on. Thus, when nouns start with a vowel, then the article used is an.
So the choice of article is based upon the sounding of the first letter in a word rather than on the letter itself.