A number divisible only by itself and one. Also first in importance — the same word for indivisible and for foremost.
Latin primus (first), superlative of an old stem meaning before (compare prior, the comparative of the same stem); a number is prime when nothing stands before it in its own factoring.
A number with no factor but itself and one, and by extension whatever comes first in rank. The same root gives both senses because to be indivisible and to be foremost were once the same idea: nothing precedes it.