Skip to content

Arithmetic

Factors

Number of factors of a number

  • given number n, represent it in prime factors (prime factorization)
  • n=apbqcr...
  • a,b,c are prime numbers, and p,q,r are positive numbers
  • then total factors are
  • f(n)=(p+1)(q+1)(r+1)... where f(n) gives is number of factors in n

Proof

  • given number n
  • represent it in prime factorization apbqcr...
  • so, a can acquire powers {0,1,2,...,p}, n({0,1,2,...,p})=p+1
  • so, b can acquire powers {0,1,2,...,q}, n({0,1,2,...,p})=q+1
  • so, c can acquire powers {0,1,2,...,r}, n({0,1,2,...,p})=r+1
  • and so on, here n(A) is to represent the cardinality of set A
  • so total no. of factors are (p+1)(q+1)(r+1)

Number of factors of a number which are even

  • should have at least one 2
  • given number n
  • represent it in prime factorization 2pbqcr...
  • so, a can acquire powers {1,2,...,p}, n({1,2,...,p})=p
  • so, b can acquire powers {0,1,2,...,q}, n({0,1,2,...,p})=q+1
  • so, c can acquire powers {0,1,2,...,r}, n({0,1,2,...,p})=r+1
  • and so on, here n(A) is to represent the cardinality of set A
  • so total no. of even factors are (p)(q+1)(r+1)

Number of factors which are perfect square

  • given number n
  • represent it in prime factorization apbqcr...
  • so, a can acquire powers {0,2,4,...,p}, n({0,1,2,...,p})=p+12
  • so, b can acquire powers {0,2,4,...,q}, n({0,1,2,...,p})=q+12
  • so, c can acquire powers {0,2,4,...,r}, n({0,1,2,...,p})=r+12
  • and so on, here n(A) is to represent the cardinality of set A
  • so total no. of factors are

Products of factors of a number

  • g(n)=nf(n)/2, f(n) is number of factors of n

Number of ways of expressing a number as product of two numbers

  • given, n and its prime factorization apbqcr...
  • f(n)=(p+1)(q+1)(r+1)...
  • F(n)=12f(n),
    • is not possible when f(n) is odd
    • if, p,q,r,... are all even then n is a prefect square
      • that means that n is a whole no.
      • therefore F(n)=12f(n)1, n×n is not counted

Sum of all factors of a number

  • given, n and its prime factorization apbqcr...
  • sum is
ap+11a1bq+11b1cr+11c1...

Number of ways of writing a number as product of two co-primes

  • co-primes - there gcd (hcf) is 1
  • given, n and its prime factorization apbqcr...
  • n({a,b,c,...})=x, i.e. no of unique prime in prime factorization is x
  • then, total no of co-primes are 2x1

Number of coprimes to n that are less than n

  • given, n and its prime factorization apbqcr...
  • then, ϕ(n)=n(11a)(11b)(11c)
  • so number of coprimes to n that are less than n are:
    • n2×ϕ(n)

Number of factors

p+12q+12r+12

Number of factors of n and m that are common

  • n=apbqcr...
  • m=albmcn...
  • total no of common factors are (min(p,l)+1)×(min(q,m)+1)×(min(r,m)+1)...