Gyan Room  Number Theory  Concepts & Shortcuts

Algebraic representation of numbers
Representing numbers in algebraic form is very useful while we chase X. Sharing some useful Fundas
Consecutive numbers: n, n+1, n+2 …
Even number: 2n
Consecutive even numbers: 2n, 2n+2, 2n+4 …
Odd number: 2n+1
Consecutive Odd numbers: 2n+1, 2n+3, 2n+5 …
2 digit number (say ab) = 10a + b (a and b can take values from 0 to 9)
3 digit number (say abc) = 100a + 10b + c
n digit number =10^{(n1)}digit_{1}+ 10^{(n2)}digit_{2}+… + digit_{n }(Digits taken left to right)
Three consecutive numbers: n1, n, n+1 (sums to zero)
(a + b)^{2}= a^{2}+ 2ab + b^{2}
(a  b)^{2}= a^{2} 2ab + b^{2}
(a + b)(a  b) = a^{2} b^{2}
a^{3}+ b^{3}= (a + b) (a^{2} ab + b^{2})
a^{3} b^{3}= (a  b) (a^{2}+ ab + b^{2})
(a + b)^{3}= a^{3}+ 3a^{2}b+ 3ab^{2}+ b^{3}
(a  b)^{3}= a^{3} 3a^{2}b+ 3ab^{2} b^{3}
(a + b + c)^{2}= a^{2}+ b^{2}+ c^{2}+ 2ab + 2bc + 2ca
(a + b + c) (a^{2}+ b^{2}+ c^{2} ab  bc  ca) = a^{3}+ b^{3}+ c^{3} 3abc
a^{3}+ b^{3}+ c^{3}= 3abc, if a + b + c = 0
a^{0}= 1
a^{1}= a
a^{m}× a^{n}= a ^{(m + n)}
a^{m}/ a^{n}= a ^{( m – n )}
(a^{m})^{n}= a^{m.n}
a^{ m}= 1 / a^{m }
(ab)^{m}= a^{m}b^{m}
Symbol √ is called as radical sign or radix.
Need a case to solve? Here we go…
When you reverse the digits of the number 13, the number increases by 18. How many other two digit numbers increase by 18 when their digits are reversed? (CAT 2006)
Here we are not just asked to find X but the whole X Gang! What are the clues?
1. X Gang contains only two digit numbers
2. If X Gang members are reversed they are increased by 18 than the original value.
We can write any 2 digit number xy as 10x + y (x and y are the first and second digit).
After reversing the number is yx represented as 10y + x.
Given 10y + x = 10 x + y + 18, solving y = x + 2. y should be 2 more than x.
Now y cannot be 2 as then x = 0 and the number 02 is not a 2 digit number!
y can take values from 3 to 9
when y = 3, x = 3 – 2 =1; y=4, x = 4 – 2 = 2; and so on…
Our gang is (10x + y) for all the above (x, y) which are 13, 24, 35, 46, 57, 68 and 79.Gang busted! :)

Divide and Conquer
We will now learn an interesting and equally important concept, divisibility of numbers. These concepts will be used extensively during prime factorization and while calculating HCF/LCM. Here we will just focus on how we can easily check whether a given number is divisible by some common divisors or not.
Divisible by 2: If the last digit is divisible by 2.
12, 142, 68…Divisible by 3: Sum of digits of the number is divisible by 3.
15672, sum of digits = 1+5+6+7+2 = 21 = 3 * 7, hence divisible by 3.Divisible by 4: If the last 2 digits are divisible by 4.
724, Last 2 digits (24) gives a number divisible by 4.Divisible by 5: If the last digit is 5 or 0.
E.g. 625, 310 etc…Divisible by 7: Subtract twice the unit digit from the remaining number.
If the result is divisible by 7, the original number is.
14238, 2 * 8 – 1423 = 1407 = 201 * 7, hence divisible by 7Divisible by 8: If the last 3 digits are divisible by 8.
1040, Last 3 digits (040) gives a number divisible by 8.
A number is divisible by 2^{n}if the last n digits are divisible by 2^{n}.Divisible by 9: If the sum of the digits is divisible by 9
972036, sum of the digits = 9 + 7 + 2 + 0 + 3 + 6 = 27, divisible by 9.Divisible by 11: If the difference between the sum of digits at the odd place and the sum of digits at the even place is zero or divisible by 11.
1639, (9+6)  (3+1) = 11, divisible by 11.Divisible by 13: If the difference of the number of its thousands and the remainder of its division by 1000 is divisible by 13.
2184, 2  184 = 182, so divisible by 13.Divisible by 33, 333, 3333… & 99, 999, 9999…:
As a general rule, to check a given number is divisible by 333…3 (n digits) just see whether the sum of digits taken n at a time from right is divisible by 333…3 (n digits). If yes then the original number is also divisible by 33…3 (n digits). It is easy to understand through examples.
Is 627 divisible by 33?
Take 2 digits from right at a time, and get the sum.
27 + 06 = 33, hence divisible by 33Is 22977 divisible by 333?
Take 3 digits from right at a time and find the sum.
977 + 022 = 999, hence divisible by 333Same can be applied for checking the divisibility of a given number with 99…9 (n digits). Check if the sum of digits taken n at a time from right is divisible by 999…9 (n digits). If yes then the original number is also divisible by 99…9 (n digits)
Is 6435 divisible by 99?
35 + 64 = 99. As per the above rule, 6435 is divisible by 99.How much time you need to tell whether the number 1000000998 is divisible by 999?

Approximate
Wherever possible, approximate. Most of the times we don’t need precision level more than 2 decimal points to uniquely differentiate the given options. If the question demands more precision than that, leave the question and come back if you have time.
As we discussed earlier, an easy approximation technique is to write numerator with respect to denominator
2136 / 17 =
2136 ≈ 1700 (100 * 17) + 340 (20 * 17) + 85 (17 * 05) + 8.5 (17 * 0.5) + 1.7 (17 * 0.1) …
2136 / 17 ≈ 100 + 20 + 5 + 0.5 + 0.1 +… ≈ 125.6 ( Actual value is 125.64 )There are various approximation techniques which are discussed and debated at multiple forums. But I feel most of them are complicated considering the level of approximation we need. Stick with methods that are simple to understand and easy to apply. I am not sure, but many approximation techniques are some where related to the aforementioned method. If you know some methods which are useful in approximation, do share.
Use Options
Number S is equal to the square of the sum of the digits of a 2 digit number D. If the difference between Sand D is 27, then D is (CAT 2002)
(1) 32
(2) 54
(3) 64
(4) 52Here we can form the algebraic equation and solve… but easiest way is to take options one by one and see which option satisfies the given condition.
Option1: 32, S – D = (3 + 2)^{2}– 32 = 7, Not the answer.
Option2: 54, S – D = (5 + 4)^{2}– 54 = 27… Oila!!! :)Options are not just useful in substitution, but will also help us in deduction also.
‘Solving’ this equation will take us ages. We can write the above question as
Options can be written as
(1) (n+1) – 1/ (n+1)
(2) n – 1/n
(3) n – 1/ (n+1)
(4) (n+1) – 1/n
(5) (n+1) – 1/ (n+2)For n =1, sum is √ (2+1/4) = √9/4 = 3/2
Now substitute n=1 in the options
1) 2 – 1/2 = 3/2
2) 1 – 1/1 = 0
3) 1 1/2 = 1/2
4) 2 1/1 = 1
5) 2 – 1/3 = 5/2
Only option 1 satisfies. This holds true for any value of n. Coming back to the original question where n = 2007, sum should be equal to (n+1) – 1/ (n+1) = 2008 – 1/2008.

In how many equal parts should you divide 100 so that the continued product of those equal parts will be maximum?
Formula: N =floor (Sum/e)
where e is the Euler’s constant approximately equal to 2.71828
Floor function means the greatest integer less than or equal to
Solution:
N = floor (100/e) ~ 36
N = 36

How to find two numbers given that their sum is S and product of x^a and y^b is to be maximized.
Formula: X = S * a / ( a + b )
Y = S * a / ( a + b)Example: Find 2 positive numbers such that their sum is 20 and the product of the cube of the first and the square of the second number is to be maximized.
Solution:
Product = x^3 y^2
Applying the formula above, we will get the following values below:
X = 20 * 3 / ( 3 + 2 ) = 12
Y = 20 * 2 ( 3 + 2 ) = 8
The numbers required are 12 and 8.

In scenarios like finding distinct values of [x^2/n] where x can be from 1, 2, 3 ... n
[1^2/n], [2^2/n] ... [(n/2)^2/n] will yield all numbers from 0 to [n/4] (means [n/4] + 1 distinct integers)
Then the next set (from [(n/2 + 1)^2/n] till [n^2/n] will be all different integers (means [n/2] distinct integers)
So the number of distinct integers would be [n/2] + [n/4] + 1
if n = 100,
number of distinct integers would be [100/2] + [100/4] + 1 = 76if n = 2014,
number of distinct integers would be [2014/2] + [2014/4] + 1 = 1511if n = 13
number of distinct integers would be [13/2] + [13/4] + 1 = 10Just trying to generalize a solution shared by Kamal Lohia sir.

Kaprekar's constant
6174 is known as Kaprekar's constant.
 Take any fourdigit number, using at least two different digits. (Leading zeros are allowed.)
 Arrange the digits in descending and then in ascending order to get two fourdigit numbers, adding leading zeros if necessary.
 Subtract the smaller number from the bigger number.
 Go back to step 2 and repeat.
The above process will always yield 6174, in at most 7 iterations. The only fourdigit numbers for which Kaprekar's routine does not reach 6174 are repdigits such as 1111, which give the result 0000 after a single iteration.