One of the very first things a student of Spanish or any language learns is how to count. So, what comes after veinte (twenty)? Veintiuno! (Twenty-one!) Simple, right? So listen to this young man from Mexico introduce himself in front of the video camera:
Hola, ¿cómo están? Mi nombre es David de Valle. Tengo veintiún años y soy estudiante de negocios internacionales.
"Hi, how are you? My name is David de Valle. I'm twenty-one years old and I'm a student of international business."
[Captions 1-2, Amigos D.F. > Consejos para la calle]
So where did the 'o' at the end of veintiuno go? As it turns out, "veintiuno" is on a short list of Spanish words that lose their last, unstressed syllable when they come before certain nouns. [To get technical, we're talking about "apocope," (apócope in Spanish) defined as "the loss of one or more sounds or letters at the end of a word" (Merriam-Webster).]
Remember, when nothing follows the number 21, every syllable is pronounced:
¿Cuántos años tiene David?
"How old is David?
But when 21 is followed by a masculine noun or feminine noun that begins with a stressed "a" or a stressed "ha" sound -- it loses that final "o" and an accent mark is added to keep the stress on the "ú." For example:
David tiene veintiún años.
"David is twenty-one years old."
El pobrecito tiene veintiún granos.
"The poor kid has twenty-one pimples."
La caja tiene veintiún hachas.
"The box has twenty-one axes."
When 21 is followed by a feminine noun that does not begin with a stressed "a" or "ha" sound, the final "o" in veintiuno becomes an "a," giving us veintiuna, for example veintiuna chicas (twenty-one girls) or veintiuna sillas (twenty-one chairs).
El libro tiene veintiuna páginas.
"The book has twenty-one pages."
[Note: It is not at all uncommon to hear this rule as it pertains to feminine nouns being "broken" by native Spanish speakers. For example, the Spanish pop group "21 Japonesas" (21 Japanese Girls) is often called "Veintiún Japonesas" by broadcasters, much to the dismay of language watchdogs.]
The number "one" ("uno") and any other number that ends with "one" follows the same pattern, so it's "ochenta y uno without a noun following the number, but ochenta y un años or ochenta y una reglas ("eighty-one rules"). [Note that no accent mark is needed for the u in un since there could be no confusion regarding which syllable to stress in the one syllable word.]
Other common words that drop endings before certain nouns include "ciento -> cien" ("100"), "bueno -> buen" ("good"), and "santo -> san" ("saint"). There are more extensive lists of apocopes in Spanish here and here.