# Number Theory Formulas

Number system is a very important chapter and you will get questions from this area in many competitive exams.  We start with classification of numbers.

## Types of numbers :

1. Natural numbers (N) = 1, 2, 3, . . . .
2. Whole numbers (W) = 0, 1, 2, 3, . . . .
3. Intezers (Z) = −∞ . . . −2, −1, 0, 1, 2, 3, . . .∞
4. Rational numbers (Q) = The numbers of the form pq  where q ≠ 0.  Eg: 15 , 0.46, 0.333333
5. Irrational numbers ($\mathbb{R} - Q$) = The numbers of the form x1n  ≠ Intezer.  Also π and e also irrational numbers.
Rational and Irrational numbers together is called Real numbers. It is denoted by $\mathbb{R}$

Other types of numbers:
a. Even numbers : Numbers which are exactly divisible by 2.  These numbers are in the format of 2n.
b. Odd numbers: Numbers which gives remainder 1 when divided by 2. These numbers are in the format of 2n ± 1.
c. Prime numbers : The numbers which are divisible by 1 and the number itself are primes.  The least prime is 2.
Note: There are 15 primes below 50, 25 primes below 100, 168 primes below 1000.
d. Composite numbers : The numbers of which are divisible by more than 2 numbers.  First positive composite number is 4.

## Important rules related to Even and Odd numbers:

odd ± odd = even;
even ± even = even;
even ± odd = odd

odd × odd = odd;
even × even = even;
even × odd = even.

odd(any number) = odd
even(any number) = even

## Fundamental Theorem of Arithmetic:

Any positive integer greater than 1 can be represented as a product of primes only in one way.  (Order may be different). Writing a number as a product of primes is called prime factorization format. For example, 100 can be written as 22 × 5in only one way.

### Converting recurring decimals into p/q format:

Model 1:
If all the 'n' digits after the decimal points are recurring, say,
$$x.\overline {\underbrace {abc.....}_{n - digits}}$$ = $$x.\underbrace {abc.....}_{n - digits}\underbrace {abc.....}_{n - digits}\underbrace {abc.....}_{n - digits}$$
Then $$x.\overline {\underbrace {abc.....}_{n - digits}} = x + \dfrac{{abc....}}{{\underbrace {999...}_{n - times}}}$$

Example:
$$3.\overline {713}$$ =
Solution:
$$3.\overline {713}$$ = $$3 + \dfrac{{713}}{{999}}$$ = $$\dfrac{{2997 + 713}}{{999}} = \dfrac{{3710}}{{999}}$$

Model 2:
If certain 'n' digits after the decimal points are recurring, and 'k' digits are not recurring,
$$x.\underbrace {mnp..}_{k - digits}\underbrace {abc.....}_{n - digits}\underbrace {abc.....}_{n - digits}\underbrace {abc.....}_{n - digits}$$ = $$x.\underbrace {mnp..}_{k - digits}\underbrace {\overline {abc.....} }_{n - digits}$$
In this case, subtract the digits which are not recurring from the whole number and put it in the numerator.  In the denominator, put 9's for the number of digits which recur, and put 0's for the number of digits which won't recur.
=$$x.\underbrace {mnp..}_{k - digits}\underbrace {\overline {abc.....} }_{n - digits}$$ = $$x + \dfrac{{mnp...abc... - mnp...}}{{\underbrace {999....}_{n - digits}\underbrace {000....}_{k - digits}}}$$

Example:
$$12.3\overline {45}$$=
Solution:
Here only 45 are recurring.
Therefore, $$12.3\overline {45} = 12 + \dfrac{{345 - 3}}{{990}}$$ = $$12 + \dfrac{{342}}{{990}}$$ = $$12 + \dfrac{{38}}{{110}}$$ = $$12 + \dfrac{{19}}{{55}}$$ = $$\dfrac{{679}}{{55}}$$