For all but finitely many $n \in \mathbb N$ In my book I have the following theorem:

A sequence $\langle a_n \rangle$ converges to a real number $A$ if and only if every neighborhood of $A$ contains $a_n$ for all but finitely many $n \in \mathbb N$.

Can anyone clarify what the phrase, "All but finitely many", means?
 A: Let $\langle a_n:n\in\Bbb N\rangle$ be a sequence, and let $S$ be a set. The assertion that $S$ contains $a_n$ for all but finitely many $n\in\Bbb N$ means that the set $\{n\in\Bbb N:a_n\notin S\}$ is finite: there are only finitely many indices $n$ such that $a_n$ is not in $S$. Note that zero is finite: it’s quite possible that $a_n\in S$ for every $n\in\Bbb N$.
The key observation, already mentioned in the comments, is that if $\{n\in\Bbb N:a_n\notin S\}$ is finite, either it is empty, or it’s non-empty, in which case it has a largest element. If it’s empty, then $a_n\in S$ for all $n\ge 0$. If it has a largest element, say $m$, then $a_n\in S$ for all $n\ge m+1$. In either case a whole ‘tail’ of the sequence is in $S$.
Conversely, if there is some $m\in\Bbb N$ such that $a_n\in S$ for every $n\ge m$, then
$$\{n\in\Bbb N:a_n\notin S\}\subseteq\{n\in\Bbb N:n<m\}\;,$$
which is a finite set, so $S$ contains $a_n$ for all but finitely many $n\in\Bbb N$.
A: In your sentence, "but" (is not a conjunction, but a preposition and) means "except". At first, I didn't know that the word "but" has two meanings and thus I had exactly the same doubt as you.
Notice that the bold word "but" above (is a conjunction and) doesn't have the same meaning as in your sentence.
