This site is supported by donations to The OEIS Foundation.

# 2

Jump to: navigation, search

This article is under construction.

Please do not rely on any information it contains.

2 is the only even prime number, and thus "the oddest prime."

## Membership in core sequences

 Even numbers 0, 2, 4, 6, 8, 10, 12, 14,... A005843 Prime numbers 2, 3, 5, 7, 11, 13, 17, 19, ... A000040 Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, 21, ... A000045 Lucas numbers 2, 1, 3, 4, 7, 11, 18, 29, ... A000032 Catalan numbers 1, 1, 2, 5, 14, 42, 132, ... A000108 Factorials 1, 1, 2, 6, 24, 120, 720, ... A000142 Primorials 1, 2, 6, 30, 210, 2310, ... A002110

In Pascal's triangle, 2 occurs only once, and is in fact the only positive integer to appear only once in the triangle. 1 occurs infinitely often, while all other integers appear at least twice. (In Lozanić's triangle, 2 occurs four times).

## Sequences pertaining to 2

 ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {n}})}}$ has class number 2 −5, −6, −10, −13, −15, −22, −35, −37, −51, −58, −91, −115, −123, −187, ... A005847 ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {n}})}}$ has class number 2 10, 15, 26, 30, 34, 35, 39, 42, 51, 55, 58, 65, 66, 70, 74, 78, 85, 87, 91, 95, ... A029702

## Partitions of 2

There are only two partitions of 2: {1, 1} and {2}. Thus the only partition of 2 into primes is a trivial partition.

## Roots and powers of 2

In the table below, irrational numbers are given truncated to eight decimal places.

 ${\displaystyle {\sqrt {2}}}$ 1.41421356 A002193 2 2 4 ${\displaystyle {\sqrt[{3}]{2}}}$ 1.25992104 A002580 2 3 8 ${\displaystyle {\sqrt[{4}]{2}}}$ 1.18920711 A010767 2 4 16 ${\displaystyle {\sqrt[{5}]{2}}}$ 1.14869835 A005531 2 5 32 ${\displaystyle {\sqrt[{6}]{2}}}$ 1.12246204 A010768 2 6 64 ${\displaystyle {\sqrt[{7}]{2}}}$ 1.10408951 A010769 2 7 128 ${\displaystyle {\sqrt[{8}]{2}}}$ 1.09050773 A010770 2 8 256 ${\displaystyle {\sqrt[{9}]{2}}}$ 1.08005973 A010771 2 9 512 ${\displaystyle {\sqrt[{10}]{2}}}$ 1.07177346 A010772 2 10 1024 ${\displaystyle {\sqrt[{11}]{2}}}$ 1.06504108 A010773 2 11 2048 ${\displaystyle {\sqrt[{12}]{2}}}$ 1.05946309 A010774 2 12 4096 ${\displaystyle {\sqrt[{13}]{2}}}$ 1.05476607 A010775 2 13 8192 ${\displaystyle {\sqrt[{14}]{2}}}$ 1.05075663 A010776 2 14 16384 ${\displaystyle {\sqrt[{15}]{2}}}$ 1.04729412 A010777 2 15 32768 ${\displaystyle {\sqrt[{16}]{2}}}$ 1.04427378 A010778 2 16 65536 A000079

Of course the roots given above are the principal real roots. There are also negative real roots and complex roots.

• ${\displaystyle {\sqrt {2}}}$, ${\displaystyle -{\sqrt {2}}}$ (both real)
• ${\displaystyle {\sqrt[{3}]{2}}}$, ${\displaystyle -{\frac {\sqrt[{3}]{2}}{2}}\pm {\frac {\sqrt {-3}}{\sqrt[{3}]{4}}}}$ (the two complex roots are the same except for the sign of the imaginary part)
• ${\displaystyle {\sqrt[{4}]{2}}}$, ${\displaystyle -{\sqrt[{4}]{2}}}$, ${\displaystyle i{\sqrt[{4}]{2}}}$, ${\displaystyle -i{\sqrt[{4}]{2}}}$
• ${\displaystyle {\sqrt[{5}]{2}}}$, and so on and so forth.

The number 2 figures in the simple continued fraction for its own principal square root:

${\displaystyle {\sqrt {2}}=1+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+\ddots }}}}}}}}}}}$

And, interestingly enough, also figures in a continued fraction involving the square root of 3:

${\displaystyle 1+{\sqrt {3}}=2+{\cfrac {2}{2+{\cfrac {2}{2+{\cfrac {2}{2+{\cfrac {2}{2+{\cfrac {2}{2+\ddots }}}}}}}}}}}$

(See A090388).

## Logarithms and squares

In the OEIS specifically and mathematics in general, ${\displaystyle \log x}$ refers to the natural logarithm of ${\displaystyle x}$, whereas all other bases are specified with a subscript. In information theory, the binary logarithm is often of interest.

From Fermat's little theorem, we can deduce that if ${\displaystyle n}$ is not a multiple of 3, then ${\displaystyle n^{2}-1}$ is.

If ${\displaystyle n}$ is not a multiple of 5, then either ${\displaystyle n^{2}-1}$ or ${\displaystyle n^{2}+1}$ is. Hence the formula for the Legendre symbol ${\displaystyle \left({\frac {a}{5}}\right)=a^{2}\mod 5}$.

As above, irrational numbers in the following table are truncated to eight decimal places.

 ${\displaystyle \log _{2}2}$ 1.00000000 2 2 4 ${\displaystyle \log _{2}e}$ 1.44269504 A007525 ${\displaystyle \log 2}$ 0.69314718 A002162 ${\displaystyle e^{2}}$ 7.38906 A072334 ${\displaystyle \log _{2}3}$ 1.58496250 A020857 ${\displaystyle \log _{3}2}$ 0.63092975 A102525 3 2 9 ${\displaystyle \log _{2}\pi }$ 1.65149612 A216582 ${\displaystyle \log _{\pi }2}$ 0.60551156 A104288 ${\displaystyle \pi ^{2}}$ 9.8696 A002388 ${\displaystyle \log _{2}4}$ 2.00000000 ${\displaystyle \log _{4}2}$ 0.50000000 A020761 4 2 16 ${\displaystyle \log _{2}5}$ 2.32192809 A020858 ${\displaystyle \log _{5}2}$ 0.43067655 A152675 5 2 25 ${\displaystyle \log _{2}6}$ 2.58496250 A020859 ${\displaystyle \log _{6}2}$ 0.38685280 A152683 6 2 36 ${\displaystyle \log _{2}7}$ 2.80735492 A020860 ${\displaystyle \log _{7}2}$ 0.35620718 A152713 7 2 49 ${\displaystyle \log _{2}8}$ 3.00000000 ${\displaystyle \log _{8}2}$ 0.33333333 A010701 8 2 64 ${\displaystyle \log _{2}9}$ 3.16992500 A020861 ${\displaystyle \log _{9}2}$ 0.31546487 A152747 9 2 81 ${\displaystyle \log _{2}10}$ 3.32192809 A020862 ${\displaystyle \log _{10}2}$ 0.30102999 A007524 10 2 100

(See A000290 for integer squares).

## Values for number theoretic functions with 2 as an argument

 ${\displaystyle \mu (2)}$ –1 ${\displaystyle M(2)}$ 0 ${\displaystyle \pi (2)}$ 1 ${\displaystyle \sigma _{1}(2)}$ 3 ${\displaystyle \sigma _{0}(2)}$ 2 ${\displaystyle \phi (2)}$ 1 ${\displaystyle \Omega (2)}$ 1 ${\displaystyle \omega (2)}$ 1 ${\displaystyle \lambda (2)}$ 1 This is the Carmichael lambda function. ${\displaystyle \lambda (2)}$ –1 This is the Liouville lambda function. ${\displaystyle \zeta (2)={\frac {\pi ^{2}}{6}}}$ 1.6449340668482264364724... (see A013661). 2! 2 ${\displaystyle \Gamma (2)}$ 1

## Factorization of 2 in some quadratic integer rings

As was mentioned above, 2 is a prime number in ${\displaystyle \mathbb {Z} }$. But it is composite in some quadratic integer rings. In fact, in order for 2 to be a prime in ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {D}})}}$ which is a unique factorization domain, the congruence ${\displaystyle D\equiv 5\mod 8}$ must hold. If instead ${\displaystyle D\equiv 3\mod 4}$, this means that 2 is the associate of the square of a prime, while ${\displaystyle D\equiv 1\mod 8}$ means that 2 is the product of two distinct primes.[1]

 ${\displaystyle \mathbb {Z} [i]}$ ${\displaystyle (1-i)(1+i)}$ ${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ ${\displaystyle (-1)({\sqrt {-2}})^{2}}$ ${\displaystyle \mathbb {Z} [{\sqrt {2}}]}$ ${\displaystyle ({\sqrt {2}})^{2}}$ ${\displaystyle \mathbb {Z} [\omega ]}$ Prime and/or irreducible ${\displaystyle \mathbb {Z} [{\sqrt {3}}]}$ ${\displaystyle (-1)(1-{\sqrt {3}})(1+{\sqrt {3}})}$ ${\displaystyle \mathbb {Z} [{\sqrt {-5}}]}$ ${\displaystyle \mathbb {Z} [\phi ]}$ Prime ${\displaystyle \mathbb {Z} [{\sqrt {-6}}]}$ ${\displaystyle \mathbb {Z} [{\sqrt {6}}]}$ ${\displaystyle (-1)(2-{\sqrt {6}})(2+{\sqrt {6}})}$ ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {-7}})}}$ ${\displaystyle \left({\frac {1}{2}}-{\frac {\sqrt {-7}}{2}}\right)\left({\frac {1}{2}}+{\frac {\sqrt {-7}}{2}}\right)}$ ${\displaystyle \mathbb {Z} [{\sqrt {7}}]}$ ${\displaystyle (3-{\sqrt {7}})(3+{\sqrt {7}})}$ ${\displaystyle \mathbb {Z} [{\sqrt {-10}}]}$ Prime and/or irreducible ${\displaystyle \mathbb {Z} [{\sqrt {10}}]}$ Irreducible ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {-11}})}}$ ${\displaystyle \mathbb {Z} [{\sqrt {11}}]}$ ${\displaystyle (-1)(3-{\sqrt {11}})(3+{\sqrt {11}})}$ ${\displaystyle \mathbb {Z} [{\sqrt {-13}}]}$ ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {13}})}}$ Prime ${\displaystyle \mathbb {Z} [{\sqrt {-14}}]}$ ${\displaystyle \mathbb {Z} [{\sqrt {14}}]}$ ${\displaystyle (4-{\sqrt {14}})(4+{\sqrt {14}})}$ ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {-15}})}}$ ${\displaystyle \mathbb {Z} [{\sqrt {15}}]}$ Irreducible ${\displaystyle \mathbb {Z} [{\sqrt {-17}}]}$ ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {17}})}}$ ${\displaystyle (-1)\left({\frac {3}{2}}-{\frac {\sqrt {17}}{2}}\right)\left({\frac {3}{2}}+{\frac {\sqrt {17}}{2}}\right)}$ ${\displaystyle {\mathcal {O}}_{\mathbb {Q} ({\sqrt {-19}})}}$ ${\displaystyle \mathbb {Z} [{\sqrt {19}}]}$ ${\displaystyle (-1)(13-3{\sqrt {19}})(13+3{\sqrt {19}})}$

Because the norm in an imaginary quadratic ring is never negative, 2 is irreducible in almost all imaginary rings, and in fact the only exceptions are shown in the table above. Whether or not it is also prime is a separate issue, but we can generalize this much: if ${\displaystyle d<-4}$ is even and squarefree, then 2 is irreducible but not prime in ${\displaystyle \mathbb {Z} [{\sqrt {d}}]}$, for ${\displaystyle 2|({\sqrt {d}})^{2}}$ but not ${\displaystyle {\sqrt {d}}}$.

The situation is more complicated in real rings. If ${\displaystyle d}$ is positive and even, and ${\displaystyle \mathbb {Z} [{\sqrt {d}}]}$ is a unique factorization, then 2 is composite, and so is ${\displaystyle {\frac {d}{2}}}$, whether that is a prime or not in ${\displaystyle \mathbb {Z} }$. Then the fact that ${\displaystyle 2|({\sqrt {d}})^{2}}$ but not ${\displaystyle {\sqrt {d}}}$ is not evidence of multiple factorization.

## Factorization of some small integers in a quadratic integer ring adjoining ${\displaystyle {\sqrt {-2}}}$, ${\displaystyle {\sqrt {2}}}$

${\displaystyle \scriptstyle \mathbb {Z} [{\sqrt {2}}]\,}$ is a commutative quadratic integer ring with unity, and a unique factorization domain. Its units are of the form ${\displaystyle \scriptstyle \pm (1+{\sqrt {2}})^{n}\,}$ (with ${\displaystyle \scriptstyle n\,\in \,\mathbb {Z} \,}$). If an odd prime ${\displaystyle p\in \mathbb {Z} }$ is congruent of 1 or –1 modulo 8, it is composite in ${\displaystyle \scriptstyle \mathbb {Z} [{\sqrt {2}}]\,}$, and obviously so is 2 (see A038873).

Expressing the successive units ${\displaystyle \scriptstyle (1+{\sqrt {2}})^{n}\,}$ in ${\displaystyle \scriptstyle \mathbb {Z} [{\sqrt {2}}]\,}$ as ${\displaystyle a+b{\sqrt {2}}}$, the sequence of ${\displaystyle a}$ is given by A001333, while ${\displaystyle b}$ is given by the Pell numbers, A000129.

${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ is also a unique factorization domain. But in it, there are only two units: 1 and –1. The inertial primes in ${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ are the primes in ${\displaystyle \mathbb {Z} }$ that are congruent to 5 or 7 modulo 8.

 ${\displaystyle n}$ ${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ ${\displaystyle \mathbb {Z} [{\sqrt {2}}]}$ 1 Unit 2 ${\displaystyle (-1)({\sqrt {-2}})^{2}}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{2}\,}$ 3 ${\displaystyle (1-{\sqrt {-2}})(1+{\sqrt {-2}})}$ Prime 4 ${\displaystyle (-1)({\sqrt {-2}})^{4}}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{4}\,}$ 5 Prime 6 ${\displaystyle (-1)({\sqrt {-2}})^{2}(1-{\sqrt {-2}})(1+{\sqrt {-2}})}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{2}3\,}$ 7 Prime ${\displaystyle \scriptstyle (3+{\sqrt {2}})(3-{\sqrt {2}})\,}$ 8 ${\displaystyle (-1)({\sqrt {-2}})^{6}}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{6}\,}$ 9 ${\displaystyle (1-{\sqrt {-2}})^{2}(1+{\sqrt {-2}})^{2}}$ 3 2 10 ${\displaystyle (-1)({\sqrt {-2}})^{2}5}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{2}5\,}$ 11 ${\displaystyle (3-{\sqrt {-2}})(3+{\sqrt {-2}})}$ Prime 12 ${\displaystyle (-1)({\sqrt {-2}})^{2}(1-{\sqrt {-2}})(1+{\sqrt {-2}})}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{4}3\,}$ 13 Prime 14 ${\displaystyle (-1)({\sqrt {-2}})^{2}7}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{2}(3+{\sqrt {2}})(3-{\sqrt {2}})\,}$ 15 ${\displaystyle (1-{\sqrt {-2}})(1+{\sqrt {-2}})5}$ 3 × 5 16 ${\displaystyle (-1)({\sqrt {-2}})^{8}}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{8}\,}$ 17 ${\displaystyle (3-2{\sqrt {-2}})(3+2{\sqrt {-2}})}$ ${\displaystyle \scriptstyle (-1)(1+3{\sqrt {2}})(1-3{\sqrt {2}})\,}$ 18 ${\displaystyle (-1)({\sqrt {-2}})^{2}(1-{\sqrt {-2}})^{2}(1+{\sqrt {-2}})^{2}}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{2}3^{2}\,}$ 19 ${\displaystyle (1-3{\sqrt {-2}})(1+3{\sqrt {-2}})}$ Prime 20 ${\displaystyle (-1)({\sqrt {-2}})^{4}5}$ ${\displaystyle \scriptstyle ({\sqrt {2}})^{4}5\,}$

We then say that ${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ is norm-Euclidean, and from this it automatically follows that it is a principal ideal domain and therefore a unique factorization domain.

Theorem ZI2EUC. The domain ${\displaystyle \mathbb {Z} [{\sqrt {-2}}]}$ is a Euclidean domain in which the absolute value of the norm is a suitable Euclidean function. Given any two nonzero numbers ${\displaystyle m,n\in \mathbb {Z} [{\sqrt {-2}}]}$, it is always possible to find two other numbers ${\displaystyle q,r\in \mathbb {Z} [{\sqrt {-2}}]}$ such that ${\displaystyle n=qm+r}$, ${\displaystyle q\neq 0}$ and ${\displaystyle 0\leq N(r).
Proof. If ${\displaystyle m}$ is a divisor of ${\displaystyle n}$, or the other way around, then ${\displaystyle q={\frac {n}{m}}}$ or ${\displaystyle {\frac {m}{n}}}$ as needed, and ${\displaystyle r=0}$. If this is not the case, it does not automatically mean ${\displaystyle m}$ and ${\displaystyle n}$ are coprime, but it does mean that ${\displaystyle {\frac {n}{m}}\not \in \mathbb {Z} [{\sqrt {-2}}]}$ but ${\displaystyle {\frac {n}{m}}\in \mathbb {Q} ({\sqrt {-2}})}$. Notate ${\displaystyle n=a+b{\sqrt {-2}}}$ and ${\displaystyle m=c+d{\sqrt {-2}}}$. The we have:
${\displaystyle {\frac {a+b{\sqrt {-2}}}{c+d{\sqrt {-2}}}}={\frac {(a+b{\sqrt {-2}})(c+d{\sqrt {-2}})}{c^{2}+2d^{2}}}=s+t{\sqrt {-2}}}$
where ${\displaystyle s,t\in \mathbb {Q} ({\sqrt {-2}})}$. Now choose ${\displaystyle u,v\in \mathbb {Z} }$ such that ${\displaystyle |s-u|,|t-v|\leq {\frac {1}{2}}}$ and then set ${\displaystyle q=u+v{\sqrt {-2}}}$ and ${\displaystyle r=n-qm}$. Since the norm is multiplicative, it follows that ${\displaystyle N(r)=N(m)N((s-u)+(t-v){\sqrt {-2}})}$ and therefore
${\displaystyle 0
as specified by the theorem. □

## Representation of 2 in various bases

Obviously, in binary, 2 is represented as 10. For all ordinary higher integer bases, 2 is 2. In the balanced ternary numeral system, 2 is {1, −1}, meaning ${\displaystyle 3^{1}-3^{0}}$. In negabinary, 2 is 110, since ${\displaystyle (-2)^{2}+(-2)^{1}=4-2=2}$. In quater-imaginary base, 2 is 2. In both the factorial numeral system and in ${\displaystyle {\sqrt {2}}}$-base, 2 is 100. And in the phi numeral system, 2 is 10.01, since ${\displaystyle \phi +\phi ^{-2}=1.618...+0.381966...=2}$.

## References

1. This is Theorem 9.29 (4) in Niven-Zuckerman. See also Theorem P2 in quadratic integer rings#Primes in quadratic integer rings.
 ${\displaystyle -1}$ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 1729