Why do we have two versions of the indefinite article? When did this happen? Are there any texts where only one is used?
The following extract may help understand the origin and evolution of a and an ( see also the juncture loss below).
The indefinite article of English takes the two forms a and an. Semantically they can be regarded as meaning "one", usually without emphasis. They can be used only with singular countable nouns; for the possible use of some (or any) as an equivalent with plural and uncountable nouns.
Distinction between a and an:
The form an is used before words starting with a vowel sound, regardless of whether the word begins with a vowel letter. This avoids the glottal stop (momentary silent pause) that would otherwise be required between a and a following vowel sound. Where the next word begins with a consonant sound, a is used. Examples: a box; an apple; an SSO (pronounced "es-es-oh"); a HEPA filter (HEPA is pronounced as a word rather than as letters); an hour (the h is silent); a one-armed bandit (pronounced "won..."); an heir (pronounced "air"); a unicorn (pronounced "yoo-"); an herb in American English (where the h is silent), but a herb in British English.
- Both a and an are usually pronounced with a schwa: /ə/, /ən/. However, when stressed (which is rare in ordinary speech), they are normally pronounced respectively as /eɪ/ (to rhyme with day) and /æn/ (to rhyme with pan). See Weak and strong forms in English.
- An is the older form (related to one, cognate to German ein; etc.). An was originally an unstressed form of the number ān 'one'.
In a process called juncture loss, the n has wandered back and forth between the indefinite article and words beginning with vowels over the history of the language, where for example what was once a nuncle is now an uncle.
The Oxford English Dictionary gives such examples as “smot hym on the hede with a nege tool” from 1448 for “smote him on the head with an edge tool”, as well as “a nox“ for an ox and “a napple“ for an apple. Sometimes the change has been permanent. For example, a newt was once “an ewt“ (earlier euft and eft), a nickname was once “an eke-name”, where eke means "extra" (as in eke out meaning "add to"), and in the other direction, “a napron” (meaning a little tablecloth, related to the word napkin) became an apron, and “a naddre” became an adder. The initial n in orange was also dropped through juncture loss, but this happened before the word was borrowed into English.
(English articles: Wikipedia)