Two has many properties in mathematics. An integer is called even if it is divisible by 2. For integers written in a numeral system based on an even number, such as decimal and hexadecimal, divisibility by 2 is easily tested by merely looking at the last digit. If it is even, then the whole number is even. In particular, when written in the decimal system, all multiples of 2 will end in 0, 2, 4, 6, or 8.
Two is the smallest and the first prime number, and the only even one (for this reason it is sometimes called “the oddest prime”). The next prime is three. Two and three are the only two consecutive prime numbers. 2 is the first Sophie Germain prime, the first factorial prime, the first Lucas prime, and the first Smarandache-Wellin prime.
It is an Eisenstein prime with no imaginary part and real part of the form . It is also a Stern prime, a Pell number, the first Fibonacci prime, and a Markov number—appearing in infinitely many solutions to the Markov Diophantine equation involving odd-indexed Pell numbers.
It is the third Fibonacci number, and the third and fifth Perrin numbers.
Despite being a prime, two is also a highly composite number, because it has more divisors than the number one. Two is the smallest highly composite number. The next highly composite number is four.
Vulgar fractions with 2 or 5 in the denominator do not yield infinite decimal expansions, as is the case with all other primes, because 2 and 5 are factors of ten, the decimal base.
Two is the base of the simplest numeral system in which natural numbers can be written concisely, being the length of the number a logarithm of the value of the number (whereas in base 1 the length of the number is the value of the number itself); the binary system is used in computers.