This site is supported by donations to The OEIS Foundation.

2

From OeisWiki
Jump to navigationJump to 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

𝒪(n) has class number 2 −5, −6, −10, −13, −15, −22, −35, −37, −51, −58, −91, −115, −123, −187, ... A005847
𝒪(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.

2 1.41421356 A002193 2 2 4
23 1.25992104 A002580 2 3 8
24 1.18920711 A010767 2 4 16
25 1.14869835 A005531 2 5 32
26 1.12246204 A010768 2 6 64
27 1.10408951 A010769 2 7 128
28 1.09050773 A010770 2 8 256
29 1.08005973 A010771 2 9 512
210 1.07177346 A010772 2 10 1024
211 1.06504108 A010773 2 11 2048
212 1.05946309 A010774 2 12 4096
213 1.05476607 A010775 2 13 8192
214 1.05075663 A010776 2 14 16384
215 1.04729412 A010777 2 15 32768
216 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.

  • 2, 2 (both real)
  • 23, 232±343 (the two complex roots are the same except for the sign of the imaginary part)
  • 24, 24, i24, i24
  • 25, and so on and so forth.

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

2=1+12+12+12+12+12+

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

1+3=2+22+22+22+22+22+

(See A090388).

Logarithms and squares

In the OEIS specifically and mathematics in general, logx refers to the natural logarithm of 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 n is not a multiple of 3, then n21 is.

If n is not a multiple of 5, then either n21 or n2+1 is. Hence the formula for the Legendre symbol (a5)=a2mod5.

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

log22 1.00000000 2 2 4
log2e 1.44269504 A007525 log2 0.69314718 A002162 e2 7.38905609 A072334
log23 1.58496250 A020857 log32 0.63092975 A102525 3 2 9
log2π 1.65149612 A216582 logπ2 0.60551156 A104288 π2 9.86960440 A002388
log24 2.00000000 A000038 log42 0.50000000 A020761 4 2 16
log25 2.32192809 A020858 log52 0.43067655 A152675 5 2 25
log26 2.58496250 A020859 log62 0.38685280 A152683 6 2 36
log27 2.80735492 A020860 log72 0.35620718 A152713 7 2 49
log28 3.00000000 log82 0.33333333 A010701 8 2 64
log29 3.16992500 A020861 log92 0.31546487 A152747 9 2 81
log210 3.32192809 A020862 log102 0.30102999 A007524 10 2 100

(See A000290 for integer squares).

Values for number theoretic functions with 2 as an argument

μ(2) –1
M(2) 0
π(2) 1
σ1(2) 3
σ0(2) 2
ϕ(2) 1
Ω(2) 1
ω(2) 1
λ(2) 1 This is the Carmichael lambda function.
λ(2) –1 This is the Liouville lambda function.
ζ(2)=π26 1.6449340668482264364724... (see A013661).
2! 2
Γ(2) 1

Factorization of 2 in some quadratic integer rings

As was mentioned above, 2 is a prime number in . But it is composite in some quadratic integer rings. In fact, in order for 2 to be a prime in 𝒪(D) which is a unique factorization domain, the congruence D5mod8 must hold. If instead D3mod4, this means that 2 is the associate of the square of a prime, while D1mod8 means that 2 is the product of two distinct primes.[1]

[i] (1i)(1+i)
[2] (1)(2)2 [2] (2)2
[ω] Prime [3] (1)(13)(1+3)
[5] Irreducible [ϕ] Prime
[6] [6] (1)(26)(2+6)
𝒪(7) (1272)(12+72) [7] (37)(3+7)
[10] Irreducible [10] Irreducible
𝒪(11) Prime [11] (1)(311)(3+11)
[13] Irreducible 𝒪(13) Prime
[14] [14] (414)(4+14)
𝒪(15) [15] Irreducible
[17] 𝒪(17) (1)(32172)(32+172)
𝒪(19) Prime [19] (1)(13319)(13+319)

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 d<4 is even and squarefree, then 2 is irreducible but not prime in [d], for 2|(d)2 but not d.

The situation is more complicated in real rings. If d is positive and even, and [d] is a unique factorization, then 2 is composite, and so is d2, whether that is a prime or not in . Then the fact that 2|(d)2 but not d is not evidence of multiple factorization.

Factorization of some small integers in a quadratic integer ring adjoining the square roots of −2, 2

[2] is a commutative quadratic integer ring with unity, and a unique factorization domain. Its units are of the form ±(1+2)n (with n). If an odd prime p is congruent of 1 or –1 modulo 8, it is composite in [2], and obviously so is 2 (see A038873).

Expressing the successive units (1+2)n in [2] as a+b2, the sequence of a is given by A001333, while b is given by the Pell numbers, A000129.

[2] is also a unique factorization domain. But in it, there are only two units: 1 and –1. The inertial primes in [2] are the primes in that are congruent to 5 or 7 modulo 8.

n [2] [2]
1 Unit
2 (1)(2)2 (2)2
3 (12)(1+2) Prime
4 (1)(2)4 (2)4
5 Prime
6 (1)(2)2(12)(1+2) (2)23
7 Prime (3+2)(32)
8 (1)(2)6 (2)6
9 (12)2(1+2)2 3 2
10 (1)(2)25 (2)25
11 (32)(3+2) Prime
12 (1)(2)2(12)(1+2) (2)43
13 Prime
14 (1)(2)27 (2)2(3+2)(32)
15 (12)(1+2)5 3 × 5
16 (1)(2)8 (2)8
17 (322)(3+22) (1)(1+32)(132)
18 (1)(2)2(12)2(1+2)2 (2)232
19 (132)(1+32) Prime
20 (1)(2)45 (2)45

We then say that [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 [2] is a Euclidean domain in which the absolute value of the norm is a suitable Euclidean function. Given any two nonzero numbers m,n[2], it is always possible to find two other numbers q,r[2] such that n=qm+r, q0 and 0N(r)<N(m).
Proof. If m is a divisor of n, or the other way around, then q=nm or mn as needed, and r=0. If this is not the case, it does not automatically mean m and n are coprime, but it does mean that nm∉[2] but nm(2). Notate n=a+b2 and m=c+d2. The we have:
a+b2c+d2=(a+b2)(c+d2)c2+2d2=s+t2
where s,t(2). Now choose u,v such that |su|,|tv|12 and then set q=u+v2 and r=nqm. Since the norm is multiplicative, it follows that N(r)=N(m)N((su)+(tv)2) and therefore
0<N(r)<34N(m)
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 3130. In negabinary, 2 is 110, since (2)2+(2)1=42=2. In quater-imaginary base, 2 is 2. In both the factorial numeral system and in 2-base, 2 is 100. And in the phi numeral system, 2 is 10.01, since ϕ+ϕ2=1.618...+0.381966...=2.

See also

References

  1. This is Theorem 9.29 (4) in Niven-Zuckerman. See also Theorem P2 in quadratic integer rings#Primes in quadratic integer rings.
Some integers
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