Number Theory Facts Collection- Easy One

Правка en5, от hydra_cody, 2023-12-14 23:55:44

These are just for reference. Sometimes it becomes easy to solve some problems for me if I know these as facts. So, I am sharing this with you all.

  • gcd(p,q)=gcd(p,p-q)
  • Two integers a,b (b != 0) there exist two unique integers q and r such that a = bq + r, 0 <= r < b
  • Bezout's identity states that if d = gcd(a,b) then there always exist integers x and y such that ax+by = d.
  • number of primes smaller than n are n/log2(n)
  • number of Divisors of a number n at max (n)^(1/3)
  • number of prime Divisors of n at max log(n)
  • harmonic series N + N/2 + N/3 + ... + 1 = O(N log N)
  • (1+1/4 + 1/9 + 1/16 + 1/25 + ...) = (π^2 / 6)
  • nCr = (n-1)C(r-1) + (n-1)Cr
  • The total number of pairs (x,y) with 1≤x,y≤n,gcd(x,y)=1 is φ(1)+φ(2)+⋯+φ(n) , where φ is Euler's totient function.
  • The number of divisors of a number n is (1+p1)*(1+p2)... where p1,p2..are the power of the prime factor of n that is n=a1^p1*a2^p2...
  • N + N / 2 + N / 4 + N / 8 + N / 16 + ... is 2*N so it's O(N)
  • Distinct values of the floor of (N / i) is 2 * sqrt(N) for i 1 to N.Proof
  • There exists a k that n<=2^k<=2*n. Use in case we want to extend an array in the power of 2 still the Tc will be O(n)

More facts are highly welcome.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en16 Английский hydra_cody 2025-03-13 21:24:55 11
en15 Английский hydra_cody 2025-03-13 21:18:52 0 (published)
en14 Английский hydra_cody 2024-12-22 23:30:11 9 Tiny change: 'B\n\nMore facts are hig' -> 'B\n\nMore Statements are hig'
en13 Английский hydra_cody 2024-12-11 22:28:53 21
en12 Английский hydra_cody 2024-02-02 19:23:52 20 Tiny change: 'lements.\n\nMore f' -> 'lements.\n- A^B=C then A^C=B\n\nMore f'
en11 Английский hydra_cody 2024-02-02 19:20:26 98
en10 Английский hydra_cody 2024-01-03 12:52:34 2 Tiny change: '\n- gcd(p,q)' -> '- gcd(p,q)'
en9 Английский hydra_cody 2024-01-03 12:30:33 171
en8 Английский hydra_cody 2024-01-02 20:30:30 2 Tiny change: 's to inf\nMore fac' -> 's to inf\n\nMore fac'
en7 Английский hydra_cody 2024-01-02 20:30:07 22
en6 Английский hydra_cody 2024-01-02 20:29:22 50
en5 Английский hydra_cody 2023-12-14 23:55:44 121
en4 Английский hydra_cody 2023-12-13 11:53:53 130
en3 Английский hydra_cody 2023-12-11 22:38:24 10
en2 Английский hydra_cody 2023-12-11 22:22:19 4 Tiny change: 'h you all.\n\n- gcd(' -> 'h you all. &#128123\n\n- gcd('
en1 Английский hydra_cody 2023-12-11 22:16:24 1145 Initial revision (saved to drafts)