0% found this document useful (0 votes)
25 views7 pages

Numbers Theory

git

Uploaded by

mohini.k2026
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

Numbers Theory

git

Uploaded by

mohini.k2026
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Numbers

Classification of Numbers

On number line, we plot numbers in increasing order from left to right. Zero is middle most position,
extreme left is negative infinity and extreme right is positive infinity.

When we say numbers, it implies real numbers, unless the quantity needs to be natural number.

• The number which appears on right of number line is larger than number on left side

• Real numbers are categorized into rational and irrational numbers. Rational numbers further have the
subset of natural numbers, whole numbers and integers

• There are infinitely many real numbers between any two numbers

• Number of integers from N1 to N2 is (N2 – N1 + 1), with both N1 and N2 included

• Zero is neither positive nor negative

• Every real number can be expressed as the sum of its integer part and fraction part. The fraction part lies
from 0 to 1, 0 included but 1 not included. Integer part is less or equal to the number. For ex, integer
and fraction part of -5.1 is -6 and 0.9.

• Integers are classified into four types. Positive integers are natural numbers, viz. 1, 2, 3, etc. Negative
integers are -1, -2, -3, etc. Non negative integers are whole numbers viz. 0, 1, 2, etc. Non positive
integers are 0, -1, -2, etc.

• Positive integers are classified in two ways and we shall learn their properties in detail. These are
even/odd and 1/prime/composite.
Rational and Irrational

A number is irrational if the digits after decimal do not terminate, and have no repeating pattern. All surds
such as square roots, cube roots etc. and some constants like π, base e of natural log etc. are irrational.

p
A number is said to be rational if it can be expressed in the form where p and q are integers, q ≠ 0. Its
q
digits after decimal may or may not terminate. The condition for them to terminate is that the denominator q
in its rational form should only be some combination of powers of 2 and/or 5. That is q = 2  5 where a, b
a b

are whole numbers.

How to Express a Non-terminating, Recurring decimal in rational form

• Separate out the integer part and only write fraction form for the decimal part
• In the numerator, write the sequence of digits after the decimal until one repetition length, and then
subtract the non-repeating part of the number, if any
• In the denominator, write as many 9’s as the length of repeating pattern followed by as many zeros as
the length of non-repeating part, if any

5341 − 5 15326
N = 1.5341341341... = 1.5341 = 1 + = 1 5336
9990
=
9990 9990

Divisibility Rules

Powers of 2 – An integer is divisible by 2n if the number formed by truncating its last n digits is divisible by
2n. Else, the remainder of original number is same as the remainder of 2n from this truncated number.

Powers of 5 – An integer is divisible by 5n if the number formed by truncating its last n digits is divisible by
5n. Else, the remainder of original number is same as the remainder of 5n from this truncated number.

3 and 9 – An integer is divisible by 3/9 if sum of its digits is divisible by 3/9. Else, remainder of original
number is same as equivalent remainder of sum of digits. While finding remainder of 3/9, it is not necessary
that we should add one digit at a time. We can also club two or three digits together, and sum them up.

11 – Find U, the sum of alternate digits of the number starting from unit’s place. Find T, the sum of alternate
digits of the number, starting from ten’s place. If (U – T) is a multiple of 11, then original number is divisible
by 11. Else, the remainder of original number is same as the equivalent remainder of (U – T).

Divisibility for composite numbers – The divisibility by a composite divisor D can be checked by writing D as
the product of co-prime numbers and checking for the individual divisibility. For ex, a number is divisible by
72 if it is divisible by both 8 and 9; and by 99 if it is divisible by both 9 and 11, etc. Note that a number that
is divisible by both 6 and 8 is divisible not by their product 48, but by their LCM viz. 24.

Properties of Natural Numbers

Even and Odd

An even number is of type 2k, and always ends with 0, 2, 4, 6 or 8. An odd integer is of type (2k + 1), and
always ends with 1, 3, 5, 7 or 9. Odd or even is defined only for natural numbers, so unless specified in the
problem, 0 is neither even nor odd. Consecutive even integers must be assumed as 2n, 2n+2, 2n+4, etc.
and consecutive odd integers must be assumed as 2n+1, 2n+3, 2n+5, etc. We have some rules for
even/odd (E/O) nature of a number obtained as arithmetic operation on two or more numbers.
• E  E = E, O  O = E, E  O = O
• E1  E 2  E3  E 4  .....  E n = E
E if n is even
• O1  O 2  O3  O 4  .....  O n = 
O if n is odd
• E  E = E, O  O = O, E  O = E
• E P = E, O P = O where P is any natural number

In general, combination i.e. whether sum or difference of even and odd numbers is even, unless there are an
odd number of odds. Ex, sum of 9 O’s and 15 E’s is odd. So if sum of 5 numbers is odd, we have multiple
possibilities: 1 odd 4 even, 3 odd 2 even, or all 5 odd.

Product of certain numbers is odd if and only if all numbers are odd.

1, Prime and Composite

A natural number N is said to be prime if it is has only two factors: 1 and itself.

A natural number N is said to be composite if it has at least one factor except 1, which is less than or equal
to the greatest integer of the square root of the number. With this definition of composite numbers, we get a
rule to check for prime number. For ex, take 281, greatest integer of its square root is 16. So we need to
check for divisibility of 281 by all primes till 16. If it is divisible by any of them, it is not a prime. Here we
find that no prime till 16 divides 281, so it is a prime.

1 is neither prime nor composite, because it does not satisfy criteria of any of them. List of first 100 primes:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

• There are infinitely many prime numbers

• There is no unique formula or pattern to the sequence of prime numbers

• Prime numbers greater than 3 are of the form, 6k±1 for some integer k.

• 2 is the only even prime, and the smallest too

• 4 is the smallest composite number

• 2 and 3 are the only two consecutive prime numbers

• 3, 5 and 7 are the only three consecutive odd prime numbers

• 25 out of first 100, and 15 out of first 50 natural numbers are primes

Co-primes

Two numbers are said to be co-prime if they do not have any common factor, i.e., their HCF is 1. Co-primes
are also known as prime to each other, or relatively prime.

• Two prime numbers are always co-prime


• A prime number can be co-prime with a composite number, such as 5 and 8
• Two composite numbers can be co-prime, such as 9 and 16, 15 and 28 etc.
• 1 is co-prime with every number, including itself
• Two consecutive numbers, i.e. N and N+1 are always co-prime
• Two consecutive odd numbers, i.e. 2N–1 and 2N+1 are always co-prime
• If A and B are co-prime, then the numbers A+B and A×B are always co-prime
Factors

The basic theory behind Factors is Fundamental Theorem of Arithmetic, which states that every natural
number can be expressed as the product of prime numbers in unique way, ignoring their rearrangement.
Hence, it is also known as Unique Factorization Theorem.

 2 3 n
N = p1 1  p 2  p3  ...  p n ; p i ' s are distinct primes

Prime factorization is the first step to understand properties of any number. For ex, a number is a perfect
square if the power of all its prime factors is even, a perfect cube if multiple of 3, etc.

Number of Factors

The factors of a number are a product of certain powers of the same prime factors as the number has, which
cannot go beyond the power in the number itself. For ex, N = 72 prime factorizes as 23 × 32. It has 3 powers
of 2 and 2 powers of 3. So for its factor, there can be prime factor 2 whose power can be 0, 1, 2 or 3 and
prime factor 3 whose power can be 0, 1 or 2. For each of the 4 different ways to choose power of 2, there
are 3 ways to choose power of 3. So the total factors of 72 are 4 × 3 = 12, including 1 and 72 itself. In
general, total factors F is obtained by multiplying the successors of powers of all its prime factors. This result
comes from Fundamental Rule of Counting, by multiplying the individual ways to choose the powers.

( )( )( ) (
F =  1 + 1  2 + 1  3 + 1 ...  n + 1 )
Vice versa, if number of factors is given, we can deduce prime factorized format of the number. If F = 15
14 2 4
then since 15 = 14+1 = (2+1)(4+1) so N can be of type p , p 1 p 2

Special Property of Perfect Square

If N is a perfect square, then its total factors F is always odd. In a perfect square, the power of all its prime
factors is even. So their successors are odd, and when we multiply a bunch of odd numbers it remains odd.
This result is vice versa true. So if number of factors is odd, the number must be a perfect square.

F → Odd  N → k 2
Distribution of Factors

If the factors of a numbers are listed in ascending order, then an equal number of factors are less than and
greater than the square root of the number.

• If N = k 2 ( perfect square ) then F = 2n + 1 so that n factors are less than k ,


n factors are more than k and k itself is a factor.
• If N is not a perfect square then F = 2n so that n factors are less than N,
and n factors are more than N

If the factors of a numbers are listed in ascending order, then the product of factors equidistant from
beginning and end is constant, and it equals to the number itself. This happens simply because f is the factor
of N, then N/f is also definitely its factor. If the number is not a perfect square, exact pairs of factors will be
obtained but for a perfect square, there is the lone middle factor whose square equals the number.

If factors of N are f1, f 2 , f3 , ... f n−1, f n then


f1  f n = f 2  f n−1 = f3  f n−2 = .... = N

The number of ways in which any natural number N can be expressed as the product of two natural numbers
depends upon whether N is a perfect square or not
• If N is not a perfect square and has F factors, then no of ways to expess N
F
as product of two natural numbers is
2
• If N = k 2 ( perfect square ) has F factors, then N is product of two numbers in
F +1 F −1
(i ) ways if numbers can be same ( ii ) ways if numbers must be distinct
2 2
Product of Factors

The product of all factors of any number is the number raised to the power of half the number of factors. It
comes from the paired factors of any number, each of whose product equals the number.

F
If N has F factors, then product of all factors is P = N2

This formula is true even if factors are odd. Recall that if factors are odd, number must be a perfect square.
Hence the factor of half in power cancels out from the factor of 2 due to perfect square.

Sum of Factors

It is obtained by combining all possible powers of all its prime factors in product form.

 2 3 n
If N = p 1 1  p 2  p3  ...  p n then sum of all its factors is

(
S = 1 + p 1 + p 12 + ... + p 1
1
)(1 + p 2
2
+ p 2 2 + ... + p 2 )....(1 + p n
n
+ p n 2 + ... + p n )
Factorials

The factorial is a notation to express the product of first N natural numbers

n ! = n  ( n − 1)  ( n − 2 )  ...  3  2 1
0! = 1, 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, 7! = 5040, ...
For higher factorials, use the recursive relation : n ! = n  ( n − 1) !

Highest power of prime p in N!

Like any natural number, N! also has a prime factorization that contains all primes less or equal to N. There
is a direct formula to obtain the power of a prime factor in N!

N   N   N 
Power of prime p in N !, X =   +  2  +  3  + ... ( till term becomes zero )
 p   p   p 

But rather than inserting p in this formula, we should do recursive division. For ex, to find power of 3 in 200!
We first divide 200 by 3 and retain the integer value, 66. Then again, divide 66 by 3 to get 22, and again to
get 7, and then again to get 2. Further division by 3 does not give integer value. So the required power is
66+22+7+2 = 97. The logic of above process is to count the multiples of successive powers of the prime.
The first division gives multiples of 3, but each multiple of 9 actually contributes two powers of 3; each
multiple of 27 contributes three powers of 3, etc. So to count these multiples we recursively divide by 3.

The power of a certain prime p in N! reduces as p increases. For ex, 200! has more powers of 2 than powers
of 3, which is more than the powers of 5, etc.
The product of any r consecutive numbers is always divisible by r!

Let X = n ( n + 1)( n + 2 )( n + 3) ... ( n + r − 2 )( n + r − 1) for n, r  N


Then X is always divisible by r !

Trailing Zeros

To find the number of trailing zeros in any number, we need to find the power of 2 and 5 in it. The lowest
among them is the number of zeros that the number ends with. For N! this is simply the power of 5’s in it.

HCF & LCM

HCF and LCM is defined for both natural and rational numbers. The highest common factor aka greatest
common divisor is the largest number that divides each of a set of given numbers completely. To find the
HCF of two numbers, we follow the long division process. But the general method to find HCF and LCM is to
prime factorize the numbers. HCF is common factors, i.e. lowest powers of primes that are common to all
the numbers. LCM is the superset of all factors, i.e. highest power of common as well as uncommon primes.

If we consider HCF and LCM of only two numbers, then we can separate out HCF from one number. The
factors that still remain in this number (the uncommon ones) combined with all factors of the other number
will be the LCM. Thus for two numbers, their product equals the product of their HCF and LCM.

If H = HCF ( N1, N 2 ) and L = LCM ( N1, N 2 ) then H  L = N1  N 2


If HCF of two numbers N1, N 2 is H, we can assume N1 = Ha, N 2 = Hb
where HCF ( a, b ) = 1 i.e. a, b are co-prime, and LCM ( N1, N 2 ) = Hab

For ex, consider N1 = 120 and N2 = 72. Then, N1 = 2 × 2 × 2 × 3 × 5, N2 = 2 × 2 × 2 × 3 × 3

HCF (common factors) = 2 × 2 × 2 × 3 = 24. LCM (common + uncommon) can be seen as all factors of N1,
plus the uncommon factors of N2. Thus, LCM = 2 × 2 × 2 × 3 × 3 × 5 = 360. Verify that H = 24, N1 = 5A,
N2 = 3H and L = 15H matches above generalization.

HCF & LCM of fractions

To find the HCF or LCM of certain fractions, first of all they should be in the most reduced form. HCF of
fractions is HCF of numerators divided by LCM of denominators. LCM of fractions is LCM of numerators
divided by HCF of denominators.

 n1 n 2 n 3
HCF  , , , ... , =
(
n k  HCF n1, n 2 , n 3 , ... , n k )
 d1 d 2 d 3
 d k  1 2 (
 LCM d , d , d , ... , d
3 k )
 n1 n 2 n 3 n k  LCM ( n1, n 2 , n 3 , ... , n k )
LCM  , , , ... , =
 d1 d 2 d 3
 d k  HCF ( d 1, d 2 , d 3 , ... , d k )

Remainders, Last Digits

A remainder is obtained as a result of some division process, which further requires a dividend and a divisor.
The number of times subtraction is done is the quotient of division process. The remainder is what remains
of the dividend and can take values from zero to one less than the divisor.

If N divided by D leaves R as remainder, then for some number k called quotient,


N = k  D + R , 0  R  D −1
N
In short notation,  R , or N % D = R
D
Negative Remainder, Equivalent Remainder

On the number line, if we jump steps starting from zero equal to the divisor D, then the remainder from N is
the numerical difference that remain to be jumped so that the next jump would make us cross N itself. If we
land on N itself by making such jumps, then D is a factor of N. If we do make the jump to cross N, then the
distance by which our step is ahead of N, is the equivalent negative remainder.

If R is the actual remainder when N is divided by D, then negative remainder,


R ( −) = R − D

For ex, if N%15 = 11, then negative remainder is 11 – 15 = –4. To get original remainder, we need to add
back the divisor. In general, when finding remainder from an arithmetic operation we might get a remainder
which is either too negative or exceeds the divisor by too much. In all such cases, we can add or subtract
requisite multiple of the divisors as to obtain the equivalent remainder in the required range, 0 ≤ R ≤ D – 1

Last Digit

The last digit of power of any number depends only on cyclicality C of its last digit.

0P , 1P , 5P , 6P → Any power always ends with same digit ( C = 1)


2P → 2, 4, 8, 6, 2, 4, 8, 6, ... ( C = 4 )
3P → 3, 9, 7, 1, 3, 9, 7, 1, ... ( C = 4 )
4P → 4, 6, 4, 6, ... ( C = 2 )
7P → 7, 9, 3, 1, 7, 9, 3, 1, ... ( C = 4 )
8P → 8, 4, 2, 6, 8, 4, 2, 6, ... ( C = 4 )
9P → 9, 1, 9, 1, ... ( C = 2 )

For four digits C = 1, i.e. power does not change their last digit. For two digits C = 2, and C = 4 in remaining
four digits. Thus, cyclicality for finding last digit is 4. That is, find remainder of power with 4 and use that to
find last digit. Note that each even digit except 0 ends in 6 at end of cyclicality i.e. when power is multiple of
4, and each odd digit except 5 ends in 1 when power is multiple of 4. This can be summarized as

14k :1 24k : 6 34k :1 44k : 6 54 k : 5


64 k : 6 7 4k :1 84 k : 6 94k :1 04k : 0

You might also like