number theory

sums and products

α2 is even if and only if α is even

√2 is irrational

√2 is irrational (using the well-ordering property)

sum of a rational and an irrational is never rational

sum of two irrationals is not always irrational

product of a rational and an irrational is always an irrational

√3 is irrational (using the well-ordering property)

√2 + √3 is irrational

floor and ceil functions

[x + n] = [x] + n where n ∈ Z

[x] + [x + 1/2] = [2x]

[2x] + [2y] ≥ [x] + [y] + [x+y] (incomplete)

[x + y] ≥ [x] + [y]

[xy] ≥ [x][y]

[x + 1/2] is the integer nearest to x

[(x + n)/m] = [([x] + n)/m] where n, m ∈ Z

[√[x]] = √[x]

Hermite's identity (incomplete)

closed formula for Σnk=1 [√k]

divisibility

the division algorithm

there are [x/d] positive integers that are ≤ x (where x ∈ Z+) and divisible by d

if α|β and α|ε, then α|(mβ + nε)

if α|β and ε|δ, then αε|βδ

3|n3-n

5|n5-n

4n2+4n is divisible by 8 for all n

sum of the cubes of three consecutive integers is divisible by 9

smallest positive linear combination of α and β = gcd(α, β)

every linear combination of α and β is a multiple of gcd(α, β), and vice versa

gcd(α, β) = gcd(β, α mod β); why the euclidean algorithm works

α1|b, α2|b and gcd(α1, α2) = 1 ⇒ α1α2|b

ε|αβ and gcd(ε, α) = 1, ⇒ ε|β

m|n ⇒ (am-bm)|(an-bn)

(m, n) = 1 ∧ d|mn ⇒ ∃d1, d2 ∈ Z+ such that d1d2 = d, d1|m, d2|n and (d1, d2) = 1

If a and b are integers, then ax + by = c has infinitely many integral solutions ⟺ (a, b)|c

If a1, a2, ..., an are nonzero positive integers, then the equation a1 x1 + a2 x2 + ... + an xn = c has infinite integral solutions if (a1, a2, ..., an) divides c, otherwise it has no solutions (incomplete)

integer representations

Basis Representation Theorem

balanced ternary expansion

prime numbers

if p is prime and p|αβ, then p|α or p|β

if p is prime and p∤α, then (p, α) = 1

any integer is either a prime or a product of primes

fundamental theorem of arithmetic

if n is composite then there is a prime divisor ≤ √n

all composite integers can be expressed as a product of two coprime integers

there are infinite number of primes

there are infinite primes of the form 4k+3

there are infinite primes of the form 3k+2

if p is a prime ≥ 5, then (p2-1)|24

no prime can be expressed as a4 - b4

for any positive integer n, there are at least n consecutive composite integers

if 2p-1 is prime, then p is prime

if n > 1 and an - 1 is prime, then a=2

if an+1 is an odd prime, then a is even and n is a power of 2

if n2+1 is prime, then n2 = 4k

a powerful number is a product of a square and a cube

any integer greater than 6 can be represented as a sum of two relatively prime integers

if ak|bk then a|b

if p is prime and p|an then p|a

If the smallest prime p of the positive integer n exceeds n1/3, then n/p must be prime or 1

every integer greater than 11 is the sum of two composite integers

if [2n/3 ≤ p < n] then [p∤2nCn]

p1p2...pt < 4n where pt ≤ n (incomplete)

Bertrand's postulate (incomplete)

If pn is the nth prime, then pn ≤ 2n

every positive integer n ≥ 7 is the sum of disctinct primes (incomplete)

Dirichlet's theorem on arithmetic progressions (incomplete)

root of xn+cn-1xn-1+...+c1x+c0 is either an integer or an irrational

logpb is irrational, where p is prime and b is a positive integer that is not a power of p

every prime divisor of a composite Fermat number Fn is of the form 2n+2k+1 (incomplete)

F0F1...Fn-1 + 2 = Fn

Fermat numbers Fn and Fm are coprime when n ≠ m

exactly divides

[pa ∥ m] ∧ [pb ∥ n] ⇒ [pmin(a,b) ∥ m+n]

[pa ∥ m] ∧ [pb ∥ n] ⇒ [pa+b ∥ mn]

[pa ∥ m] ⇒ [pan ∥ m^n]

Legendre's formula

lower bound for Legendre's formula

more gcd

(α, ε) = 1 ∧ (β, ε) = 1 ⇒ (αβ, ε) = 1

(α, β) = 1 ⇒ (αβ, ε) = (α, ε) * (β, ε)

(α, β) = 1 ∧ ε|(α+β) ⇒ (α, ε) = (β, ε) = 1

(α, β) = δ ⇒ (α/δ, β/δ) = 1

(m, β) = 1 ⇒ (mα, β) = (α, β)

(α, β) = 1 ∧ αβ = cn ⇒ ∃x, y ∈ Z+ such that α = xn ∧ β = yn

if α is odd, then gcd(α, α-2) = 1

1, α2, α3, ..., αn) ⇒ ((α1, α2), α3, ..., αn)

(α, β, ε) = 1 ⇒ (αβ, ε) = (α, ε)(β, ε)

if (x, y) divides (x + y), then there are infinite values of x and y

m * (α1, α2, ...) = (mα1, mα2, ...)

(α, β) = δ ∧ (α, ε) = δ ⇒ (α, β, ε) = δ

(α, β) = 1 ⇒ (αm, βn) = 1

(α, β) = (α + kβ, β) where k is any integer

(α, β) = 1 ⇒ (α+β, α-β) is ≤ 2

(α, β) = 1 ⇒ (α22, α+β) is ≤ 2

(α, β) = 1 ⇒ (α + β, αβ) = 1

[(a,b) = (c,d) = 1 ∧ a/b + c/d ∈ Z] ⇒ b = d

6n-1, 6n+1, 6n+2, 6n+3 and 6n+5 are pairwise relatively prime

Lamé's theorem (incomplete)

lcm

gcd(α, β) * lcm(α, β) = αβ

[ca, cb] = c[a, b]

[a, b, c] = [[a, b], c]

[a, b]|c ⟺ a|c and b|c

a,b ∈ N+ ⇒ [a, b] = cd where c|a, d|b and (c, d) = 1

(a, b) = (a + b, [a, b]) where a, b ∈ Z+

[(a, b), c] = ([a, c], [b, c]) and ([a, b], c) = [(a, c), (b, c)] where a, b, c ∈ Z+

[a, b, c] = abc(a,b,c)/(a,b)(a,c)(b,c) where a, b, c ∈ Z+

[(a, b), (a, c), (b, c)] = ([a, b], [a, c], [b, c]) where a, b, c ∈ Z+

modular arithmetic

(α ≡ β mod M) ∧ (ε ≡ δ mod M) ⇒ (α + ε ≡ β + δ mod M)

(α ≡ β mod M) ∧ (ε ≡ δ mod M) ⇒ (αε ≡ βδ mod M)

(α ≡ β mod M) ∧ (ε ≡ δ mod M) ∧ ε|α ∧ δ|β ⇒ (α/ε ≡ β/δ mod M)

(α ≡ β mod M) ∧ (n|M) ⇒ (α ≡ β mod n)

if c is an odd integer, then (c2 ≡ 1 mod 4) and (c2 ≡ 1 mod 8)

(c ∈ Z) ∧ (α ≡ β mod M) ⇒ (cα ≡ cβ mod cM)

α ≡ β mod M ⇒ (α/d ≡ β/d mod M/d) if d divides them

(εα ≡ εβ mod M) ⟺ (α ≡ β mod M/(ε, M))

(α ≡ β mod M) ⇒ (β, M) = (α, M)

if n is a positve integer and (n ≡ 3 mod 4), then n cannot be written as a sum of two square integers

if (α ≡ β mod M) and (α ≡ β mod N) then (α ≡ β mod [M, N])

if gcd(M, N) = 1, then (α ≡ β mod M) ∧ (α ≡ β mod N) ⟺ α ≡ β mod MN

if n is odd and (3 ∤ n), then (n2 ≡ 1 mod 24)

if (α, m) = 1 and if {r1, ..., rφ(m)} is a reduced residue system (modulo m), then {αr1, ..., αrφ(m)} is also a reduced residue system

Euler's theorem

Fermat's little theorem

Freshman's dream

ax ≡ b mod m has a solution if and only if gcd(a, m)|b

solution of ax ≡ b mod m (if gcd(a, m)|b)

existence and uniqueness of modular inverse if gcd(a, m) = 1

if p is prime ∧ (a2 ≡ b2 mod p) ⇒ a ≡ ±b mod p

if p is prime ∧ (a2 ≡ a mod p^k) ⇒ (a ≡ 0) or (a ≡ 1)

if p is an odd prime ∧ (a2 ≡ 1 mod pk) ⇒ a ≡ ±1 mod pk

[α ≡ ±1 mod p where p is prime] ⟺ [α is its own inverse] (assume α is positive)

if p is prime ∧ (ap ≡ bp mod p) ∧ (p ∤ a) ∧ (p ∤ b) ⇒ ap ≡ bp mod p2

If (α, n) = 1 then {β, α+β, 2α+β, ..., (n-1)α+β} forms a complete system of residues modulo n

divisibility rules

an integer is divisible by 3 or 9 if the sum of its digits is divisible by 3 or 9 respectively

an integer is divisible by 7, 11 or 13 if the alternating sum of blocks of three digits is divisible by 7, 11 or 13 respectively

an integer is divisible by 11 if the integer obtained by alternately adding and substracting the digits is divisible by 11

if d|b, then (ak ... a1a0)b is divisible by dj if and only if (aj-1 ... a1a0)b is divisible by dj

if d|(b-1), then d|(ak ... a1a0)b if and only if d|(ak + ... + a1 + a0)

if d|(b+1), then d|(ak ... a1a0)b if and only if d|((-1)kak + ... + a2 - a1 + a0)

more congruence

1 + 2 + 3 + ... + (n-1) ≡ 0 mod n if and only if n is odd

12 + 22 + 32 + ... + (n-1)2 ≡ 0 mod n ⇒ n ≡ ±1 mod 6

13 + 23 + 33 + ... + (n-1)3 ≡ 0 mod n ⇒ n is not congruent to 2 mod 4

least positive residue of 2a-1 mod 2b-1 is 2r-1 where r is the least positive residue of a mod b

(2a-1, 2b-1) = 2(a,b)-1

(2a-1, 2b-1) = 1 ⟺ (a, b) = 1

Wilson's theorem

converse of Wilson's theorem

Let p be prime, then 2(p-3)! ≡ -1 mod p

solution to x2 ≡ -1 mod p (incomplete)

if p ≡ 3 mod 4, then ((p-1)/2)! ≡ ±1 mod p

Chinese remainder theorem

[x ≡ a1 mod m1 ∧ x ≡ a2 mod m2] has a solution iff (m1, m2)|(a1-a2)

General Chinese remainder theorem

Hensel's lemma (incomplete)

arithmetic functions

If f is a multiplicative function, then [F(n) = ∑d|n, d>0 f(d)] is also a multiplicative function

The Euler phi function is multiplicative

The formula for φ(pa)

The formula for φ(n)

φ(n) ≥ √(n/2)

if n is composite, φ(n) ≤ n - √n

if n is even, then φ(2n) = 2φ(n)

if n is odd, then φ(2n) = φ(n)

φ(nj) = nj-1 φ(n)

if m|n, then φ(m)|φ(n)

if m|n, then φ(mn) = m φ(n)

d|n, d>0 φ(d) = n