Metric Unit Calculator
Computer Science · Data Sheet

Number Theory and Graph Theory Cheat Sheet

SymbolConstantValueUnit
CChinese remainder congruencesC congruent r_i (mod m_i), with pairwise coprime moduliformula
phi(n)Euler totient from factorizationIf n=product p_i^e_i, phi(n)=product p_i^(e_i-1)(p_i-1)formula
a^phi(n)Euler theorema^phi(n) congruent 1 (mod n) when gcd(a,n)=1formula
a^(p-1)Fermat little theorema^(p-1) congruent 1 (mod p) for prime p and p not dividing aformula
gcd(a,b)Euclidean algorithmgcd(a,b)=gcd(a mod b,b)formula
sigma(n)Divisor sumIf n=product p_i^e_i, sigma(n)=product (p_i^(e_i+1)-1)/(p_i-1)formula
NEven perfect numberN=2^(p-1)(2^p-1) when 2^p-1 is primeformula
(p-1)!Wilson theorem(p-1)! congruent -1 (mod p) iff p is primeformula
F(n)Mobius inversionIf G(n)=sum(d|n)F(d), then F(n)=sum(d|n)mu(d)G(n/d)formula
sum deg(v)Handshake lemmasum(v in V) deg(v)=2|E|formula
n-m+fPlanar Euler formulan-m+f=2 for a connected plane graphformula
mPlanar edge boundm<=3n-6 for a simple planar graph with n>=3formula
mBipartite planar edge boundm<=2n-4 for a simple bipartite planar graphformula

About this calculator

A searchable formula reference transcribed and normalized from the supplied Theoretical Computer Science Cheat Sheet.

Number Theory and Graph Theory formula reference

This searchable reference organizes formulas from the supplied Theoretical Computer Science Cheat Sheet into web-friendly notation. Use the search box to find a formula by name or symbol, then review its assumptions before applying it.

Some identities use conventional mathematical notation such as summation limits, factorials, congruences, expectations and asymptotic bounds. These entries are reference material and should be interpreted within their stated domains.