Download TESTCRACKER CAT TOPPER`s PROGRAM: QUANT Factorial

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Large numbers wikipedia , lookup

Addition wikipedia , lookup

Approximations of π wikipedia , lookup

Location arithmetic wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Arithmetic wikipedia , lookup

Elementary mathematics wikipedia , lookup

Division by zero wikipedia , lookup

Elementary arithmetic wikipedia , lookup

Positional notation wikipedia , lookup

Transcript
CAT | Online Training
TESTCRACKER CAT TOPPER’s PROGRAM: QUANT
Factorial
The product of n consecutive natural numbers starting from 1 to n is called as the factorial ‘n’.
n! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x ……x (n – 2) x (n – 1) x n
e.g. 5! = 1 x 2 x 3 x 4 x 5 = 120; 6! = 1 x 2 x 3 x 4 x 5 x 6 = 720
 0! = 1 and 1! = 1
 n! always ends with zero if n ≥ 5
 The product of n consecutive natural numbers is always divisible by n!, where n! = 1 × 2 × 3 × 4 ×
5…. × n
1. Given
for any natural number : if
, then what is the value
of ?
(a) 4
(b) 5
(c) 2
(d) None of these
Solution: As we know, n! = n(n – 1)!. The given function can be assumed to be the factorial function.
………….(1)
{Given in the question, compare this equation with equation (1)}
= 20 ⇒
= 5 x 4⇒ = 3. Therefore the answer is (d).
2. If n is an odd natural number, what is the highest number that always divides n × (n2 – 1)?
(a) 6
(b) 12
(c) 24
(d) None of these
2
Solution: n × (n – 1) = (n – 1) × n × (n + 1), which is a product of three consecutive numbers. Since n is
odd, the numbers (n – 1) and (n + 1) are both even. As they are two consecutive even numbers one of
these numbers will be a multiple of 2 and the other will be a multiple of 4. Hence, their product is a
multiple of 8. Since one out of every three consecutive numbers is a multiple of 3, one of the three
numbers will be a multiple of three. Hence, the product of three numbers will be a multiple of 8 × 3 =
24.
Hence, the highest number that always divides n × (n2 – 1) is 24.
3. Find the sum of all values of n which satisfy
+
= 240
Solution: Let n! = k. Taking 4! off both sides and simplifying, we get
k2 + (7!x5!)(4!/4) = 240 x (4!)k
⇒ k2 – 5!x2x4!k + 7!x5!x3!
⇒ k2 – 5!x48k + 7!x5!x6
⇒ k2 – 5!x48k + 7!x6!
[email protected]
+91 9035001996
CAT | Online Training
⇒ k2 – 5!x(6+42) k + 7!x6!
[Attention: Why are we splitting 48 into 6+42 above? Because we want the above quadratic equation to
be of the form x2-(a+b)x + ab]
⇒ k2 – 5!x6k – 5!x6x7k+ 7!x6!
⇒ k2 – 6!k – 7!k+ 7!x6!
⇒ k2 – (6!+7!)k+ 7!x6!
⇒ k = 6! and 7! ⇒ n = 6 and 7
⇒ Sum = 13
4. What is the remainder if (2n)! is divided by (n!)2?
(a) 0
(b) 2
(c) 4
(d) 1
Solution: (2n)! = 1 × 2 × 3 × 4 × … × (n – 1) × n × (n + 1) × … × 2n = (n)! × (n + 1) × (n + 2) × … × 2n. Since (n
+ 1) × (n + 2) × … × 2n is a product of n consecutive numbers, it is divisible by n!. Hence, the product (n)!
× (n + 1) × (n + 2) × … × 2n is divisible by n! × n! = (n!)2. The remainder therefore is 0.
Type 1: Highest Power of a Number in a Factorial
Suppose we have to find the highest power of k that can exactly divide n!, we divide n by K, n by
by
….. and so on till we get
to x) and then add up as
+
,n
equal to 1(where, [x] means the greatest integer less than or equal
+
+ ……..+
Examples
1. What is the largest power of 5 in 121!?
Solution:
+
= 24 + 4 = 28. (We cannot do it further since 121 is less than
= 125)
Hence, 5 is involved 28 times as a factor in 121!
2. What is the largest power of 2 that can divide 269!?
Solution:
+
+
+
+
+
+
+
= 134 + 67 + 33 + 16 + 8 + 4 + 2 + 1 = 265.
Thus the greatest power of 2 is 265 that can divide exactly 268!.
TestCracker Trick: Now, you must have noticed that we consider only integral values of the quotient
as [q] which gives an integer just less than or equal to q. So we can do this calculation in a slightly
easier manner. Here we just divide the given number and then succeeding quotients will be divided
by the same remainder as in case of successive division. So, we solve previous problem in this
manner.
[email protected]
+91 9035001996
CAT | Online Training
So we can see that this method of calculation is easier since we need not know the values of ,
……, etc. Also the division by 2 is easier than the division by , where is any large integer.
,
,
3. What is the largest power of 7 that can exactly divide 780!?
Solution:
Thus the highest power of 7 is 128 by which 777! can be divided.
4. What is the highest power of 72 in 100!?
Solution: Since our method is applicable only for the prime factors, we solve it by breaking 72 in its
prime factors.
72 = × . Therefore, we need to find the highest power of and in 72!.
72 = 8 x 9. Since to make a 8 we need 2 x 2 x 2 i.e. three times. So we need to divide 97 by 3 and get 32.
And, for 9 we need 3 x 3 i.e. two times. So we need to divide 48 by 2 and get 24.
So
x
⇒
x
Thus the largest power of 72 is 24. That can exactly divide 100!
[email protected]
+91 9035001996
CAT | Online Training
5. What is the highest power of 81 that can divide 1802!?
Solution: 81 =
So,
Thus we get
. But we need to find out for .
Therefore
=
x
=
x3
Therefore the largest power of 81 is 224 which can divide exactly 1802!
Type 2: Number of zeroes at the end of the product of numbers
We know that 10 = 2 x 5, 100 = x ……etc. So we can say that
product we need exactly
combinations of “5 x 2”
number of zeroes at the end of the
 The number of zeroes at the end of the product depends upon 2 x 5, but the condition is that
(a)
x
gives number of zeroes if < y
(b)
x
gives number of zeroes if y <
Examples
1. What is the number of zeroes at the end of 10!?
Solution: 10! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10.
It is obvious from the above expression that there are only two 5’s and eight 2’s. Since the number of 5’s
are less than number of 2’s, the number of 5’s will be effective to form the combination of ‘2 x 5’. Thus
there are only 2 zeroes at the end of 10!
2. Find the number of zeroes at the end of 100!?
(a) 24
(b) 97
(d) 23
(d) None of these
Solution: Since we know that the zeroes at the end of any product are due to the presence of 10 as the
factor of the product and the number of zeroes depends upon the number of times 10 is involved.
[email protected]
+91 9035001996
CAT | Online Training
So there are 24 combinations of 2 x 5: it means there will be 24 zeroes at the end of 100!
(Need to check for 5 only, since it has smaller power.)
3. Find the number of zeroes at the end of the product of first 100 multiples of 10.
(a) 1000
(b) 24
(b) 100
(c) 124
Solution: (10 x 20 x 30 x 40 x …………………….. x 1000)
=
[1 x 2 x 3 x 4 x ………………… x 100]
=
[100!]
As we know from previous example, highest power of 5 in 100! is 24.
Number of zeroes = 100 + 24 = 124.
4.
How many natural numbers ‘n’ are there, such that ‘n!’ ends with exactly 30 zeroes?
(a) 0
(b) 1
(c) 3
(d) 4
Solution:
According to question, n! should have 30 zeroes in the end. If n = 100 (taking randomly keeping in view
30 is the number of zeroes]
100! has
=24 ,So n should be greater than 100. Next multiple of 5 is 105. But 105 = 5 x 21,
has only one extra 5. Number of zeroes will increase by 1 only. Similarly 110, 115 and 120 also have one
extra 5. Number of zeroes (from 120! to 124!) = 28. Now, the next multiple of 5 is 125 and 125 contains
three 5’s. So, number of zeroes will increase by 3. Number of zeroes in 125! = 28 + 3 = 31. So, there is no
factorial of a number which ends with 30 zeroes.
5.
n! has x number of zeroes at the end and (n + 1)! has (x + 3) zeroes at the end. 1≤n≤1000. How many
solutions are possible for ‘n’?
(a) 8
(b) 7
(c) 1
(d) 4
Solution: We can see that increasing the natural number by 1, we are gathering 3 more powers of 5.
Therefore, (n + 1) is a multiple of 125 but not a multiple of 625 as it would result in 4 powers of 5.
Therefore, (n + 1) will be equal to all the multiples of 125 minus 625.
Total number of multiples of 125 less than 1000 = 8
Total number of multiples of 625 less than 1000 = 1
The required answer is (8 – 1) =7
[email protected]
+91 9035001996
CAT | Online Training
6. If n! and (4n)! end with 25 zeroes and 106 zeroes respectively, then which of the following is a factor
of n?
(a) 25
(b) 26
(c) 27
(d) 28
Solution:
Step 1:
According to the question n! has 25 zeroes at the end.
Here you have to try a bit to know the range of n. If n=100 (taking randomly keeping in view 26 is the
number of zeroes]
100! has
=24 ,So n should be greater than 100.
Next multiple of 5 is 105. But 105 = 5 x 21, has only one 5. Number of zeroes will increase by 1 only.
From 105 to 109, there is no multiple of 5. So, the range of n is in between 105 to 109.
Step 2:
As the next condition is (4n)! has 106 zeroes in the end. For getting the actual value just verify the value
of n within the range {105 to 109}. You will get n = 108. 108 = 4 x 27. The required answer = 27.
7. If 146! Is divisible by
then find the maximum value of n.
(a) 74
(b) 70
(c) 76
(d) 75
Solution: In its current form the question looks intimidating. But is it?
We simply need to find the highest power of 6 contained in 146!
6 = 2 x 3. As 3 is the largest prime factor of 6, we will find the highest power of 3 in 146!
The highest power of 3 in 146! = 48 + 16 + 5 + 1 = 70
8. The number 2006! is written in base 22. How many zeroes are there at the end?
(a) 450
(b) 500
(c) 199
(d) 200
Solution: Before we come to the exact question, let us quickly get a feel of how to change bases quickly
TestCracker Trick: A number written in base 10 can be converted to any base b by first dividing the
number by b and then dividing the successive quotients by b. The remainder thus obtained, written
in reverse order, given the equivalent number in base b.
Let’s convert
to base 7
=
There is exactly one zero at the end of the number converted to base 7 because the number 63 is
divisible once by 7 i.e. the highest power of 7 contained in the number 63 is exactly equal to 1. 63 =
[email protected]
+91 9035001996
CAT | Online Training
Similarly, if we convert 56 to base 2 then there will be exactly three zeroes at the end of converted
number in base 2 because the highest power of 2 contained in 56 is exactly equal to three i.e. the
number 56 is divisible thrice by 2.
Coming back to our question: Here, the number of zeroes present at the end of 2006! in base 22 will be
equal to the number of times 22 divides 2006! completely. Therefore, we need to find the highest
power of 22 contained in 2006!
22 = 2 x 11. As 11 is the largest prime factor of 22. We will find the highest power of 11 contained in
2006!
Therefore, our answer has to be [2006/11] + [2006/112] + [2006/113] = 199
9. 30! when expressed in base 12 ends with k zeroes. Find k
(a) 12
(b) 13
(c) 14
Solution: 12 = x 3
The highest power of
in 30! =
=
(d) None of these
= 13
The highest power of 3 in 30! = 10 + 3 + 1 = 14
As the highest power of is less than that of 3, the highest power of 12 in 100! Is equal to that of
Hence, k = 13.
.
Type 3: Factorial Of a Number Containing Highest Power (Different Base)
Let, z(n) be the number of zeroes present at the end of n! in base b. Therefore, the highest power of b
contained in n! is z(n). The base b =
x
x
x…… where a, b, c, …denote the power of prime
numbers contained in base b. Let p be the largest prime factor of base b. So, the highest power of p
contained in n! is z(n).
z(n) =
+
+
z(n) =
z(n) x p =
+
+ …….+
(approximately)
(approximately)
z(n) x p – n = z(n)
n = (p – 1) x z(n)
TestCracker Trick:
For a given z(n), the smallest value of a natural number n such that there are z(n) zeroes present at
the end of n! in base b can be calculated approximately as n = (p – 1) x z(n), where z (n) denotes the
number of zeroes present at the end of n! in base b and p is the largest prime factor of base b.
10. Find the least value of n such that n! has exactly 2394 zeroes
Solution: Here, z (n) = 2394. n = (5-1) x 2394 = 9576 (approximately)
[email protected]
+91 9035001996
CAT | Online Training
[Here the largest prime factor of the base (10) is 5]
Let’s count the number of zeroes present at the end of 9576! = 1915 + 383 + 76 + 15 + 3 = 2392
To get more zeroes, we will have to find the second least multiple of five greater than 9576 and it is
9585. The number of zeroes present at the end of 9585! = 1917 + 383 + 76 + 15 + 3 = 2394. Hence, n =
9585.
Note: Increase in number of zeroes depends on whether given number is multiple of 5, 25, 125 , 625……
11. Find the smallest positive integer n such that n! is a multiple of
.
Solution: It means that find the smallest natural number “n” such that n! has at least 2009 zeroes at the
end. n = (5-1) x 2009 = 8036 (approximately)
The number of zeroes present at the end of 8036! = 1607 + 321 + 64 + 12 + 2 = 2006
Here, number of zeroes are three less than required. So, we have to look for third multiple of 5 greater
than 8036.
The required multiple of 5 is 8050. The number of zeroes present at the end of 8050! = 1610 + 322 + 64
+ 12 + 2 = 2010. Therefore, 8050! has 2010 trailing zeroes. Hence, 8050! is the least multiple of
12. n! has 100 trailing zeroes in base 35. Find the minimum value of n.
Solution: Here, Base = 35 = 5 x 7. As 7 is the largest prime factor of 35. z(n) = 100.
n = (p – 1) x z(n) = 6 x 100 = 600 (approximately)
Let’s count the number of zeroes present at the end of 600! in base 35.
The number of zeroes present at the end of 600! In base 35 = Number of factors of 7 in 600!
= 85 + 12 + 1 = 98
To get two more zeroes, we will have to find the second least multiple of 7 greater than 600.
600 = 85 x 7 + 5. Therefore, the required multiple of 7 is {600 + (7 – 5) + 7} = 609.
13. What is the smallest n such that n! ends in exactly 91 zeroes in base 91
Solution: Here, Base = 91 = 7 x 13. As 13 is the largest prime factor of 91. z(n) = 91.
n = (p – 1) x z(n) = 12 x 91 = 1092 (approximately)
Let’s count the number of zeroes present at the end of 1092! in base 91.
The number of zeroes present at end of 1092! In base 91 = 84 + 6 = 90
To get more zeroes we will have to find the least multiple of 13 greater than 1092. 1092 = 84 x 13
Therefore, the next multiple of 13 is 1092 + (13) = 1105.
The number of zeroes present at the end of 1105! In base 91 = 85 + 6 = 91
Hence, n = 1105.
14. Find the number of possible values of n = 125 x m if n is less than or equal to 1000 and m is not
divisible by 5.
Solution: n =
x m, where m is not divisible by 5 i.e. the highest power of 5 in the number n is exactly
equal to three.
The highest power of 5 contained in 1000! = 200 + 40 + 8 + 1.
[email protected]
+91 9035001996
CAT | Online Training
8 and 1 are representing here number of numbers less than 1000 and divisible by
respectively.
Hence, the required answer = (8 – 1) = 7.
[Since m is not a multiple of 5, we know that n is not divisible by 54]
and
15. The quotient obtained by dividing n by 121 and the number 11 are co – prime to each other. Find the
number of possible values of n if n is less than or equal to 10,000.
Solution: It means that the highest power of 11 contained in the number n is exactly equal to two.
The highest power of 11 contained in 10,000! = 909 + 82 + 7
82 – 7 = 75.
Hence, the number of possible values of n is 75.
16. n! has number of zeroes at the end and (n + 1)! has ( + 3) zeroes at the end. Find the number of
possible values of n if n is a three digit number.
Solution: The highest power of 5 in n! is . How many zeroes we’ll get at the end of (n + 1)! depends on
whether (n + 1) is a multiple of , , , ,……and so on. Here (n + 1)! has ( + 3) zeroes at the end.
Therefore the highest power of 5 in the number (n + 1) is exactly equal to 3.
x 1 = 125
x 2 = 250
x 3 = 375
x 4 = 500
x 6 = 750
x 7 = 875
x 8 = 1000
The highest power of 5 in x 5 is 4, that’s why, we ignore it. Hence, the possible values of n = 7.
[Note: 1000 is n+1, therefore n, which is 999 will be a three digit number]
Type 4: Last Non – Zero digit/digits in a factorial
Find the last non – zero digit of n! : Last non – zero digit of (ten consecutive integers)
Let’s take a 10 – tuple of ten consecutive integers starting from (10a + 1) to (10a + 10). Last non – zero
digit of their product can be written as:
= (10a + 1)(10a + 2)(10a + 3)(10a + 4)(10a + 5)(10a + 6)(10a + 7)(10a +8)(10a +9)(10a +10)
= (10a + 1)(10a + 2)(10a + 3)(10a + 4)5(2a + 1)(10a + 6)(10a + 7)(10a +8)(10a +9)5(2a +2)
= (10a + 1)(10a + 2)(10a + 3)2(5a + 2)5(2a + 1)2(5a + 3)(10a + 7)(10a +8)(10a +9)5(2a +2)
= 100(10a + 1)(10a + 2)(10a + 3)(5a + 2)(2a + 1)(5a + 3)(10a + 7)(10a +8)(10a +9)(2a +2)
= 100(2a + 1) (2a +2)(10a + 1)(10a + 2)(10a + 3)(5a + 2)(5a + 3)(10a + 7)(10a +8)(10a +9)
{Now, we can remove both zeroes}
[email protected]
+91 9035001996
CAT | Online Training
= Last non – zero digit of (2a + 1) (2a +2)(1)(2)(3)(7)(8)(9)(5a + 2)(5a + 3)
= Last non – zero digit of 4{25a(a + 1) +6}(2a + 1)(2a + 2)
= 4 x Last non – zero digit of (2a + 1)(2a + 2)
Examples
1. What is the last non – zero digit of 20!
Solution: Using above property we can write:
1 x 2 x3 x 4 x5 x6 x7 x8 x9 x10 = 4 x
11 x 12 x13 x 14 x15 x16 x17 x18 x19 x20 = 4 x
So last non – zero digit of 20! =
[Here, a = 0]
[Here, a = 1]
x last non – zero digit of 4! = last non – zero digit of 6 x 4 = 4
TestCracker Trick:
 LNZ (10n!) = LNZ (
) x LNZ (2n!)
2. What is the last non – zero digit of 100!
Solution: Last non – zero digit of 100! = LNZ (10x10!) = LNZ ( ) x LNZ (20!)
LNZ of 410 is the same as LNZ of 42, which is 6
From the above example, we know last non – zero digit of 20!, which is 4. LNZ (100!) = LNZ (6 x 4) = 4
3. Find the last non – zero digit of 125!
Solution: 125 is not a multiple of 10; hence we can apply the above same method up to 120! and then
multiply the result with last non – zero digit of the product of remaining numbers i.e. 121 to 125.
So, the last non – zero digit of 125! = LNZ(125!) = LNZ( ) x LNZ (24!) x LNZ(121 x 122 x 123 x 124 x 125)
= LNX(6 x ) x LNZ (4!) x LNZ(21 x 22 x 23 x 24) x LNZ (121 x 61 x 123 x 31) = LNZ(6 x 4 x 4 x 3) = 8.
LAST TWO DIGITS IN A FACTORIAL
With the use of above concept, we can directly derive formula for these types of questions.
Last two non – zero digits of (10n!) = Last two non – zero digits of (
) x Last two non – zero digits of
(2n!)
TestCracker Trick:
 LTNZ (10n!) = LTNZ (
) x LTNZ (2n!)
Examples
1. What is the last two non-zero digits of 100!
(a) 44
(b) 36
(c) 76
(d) 64
10
Solution: Last two digits of 100! = 44 x last two non-zero of 20!
= 220 x 1110 x 442 x last two non-zero digits of 4!
= 76 x 01 x 36 x 24 =76 x 01 x 64 = 64; Option (d)
(Note: if 210 power is odd we get 24 as the last two digits, if even we get 76 ).
[email protected]
+91 9035001996
CAT | Online Training
2. What is the last two non – zero digits of 500!
(a) 64
(b) 44
(c) 36
(d) None of these
Solution: Last two non – zero digits of 500! =
x last two non – zero digits of 100!
= Last two non – zero digits of 76 x 01 x 64 = 64
3. How many zeroes are present at the end of 25! + 26! + 27! + 28! + 30!
Solution: Let’s find last two non-zero digits of 20! = 442 x last two non-zero digits of 4!
= 36 x 24 = 64
Last two non-zero digits of 25! = 25 x 24 x 23 x 22 x 21 x last two non-zero digits of 20!
= 25 x 24 x 23 x 22 x 21 x 64
Last two non – zero digits of 25! = 84
25! + 26! + 27! + 28! + 30! = 25!(1 + 26 + 26 x 27 + 26 x 27 x 28 + 26 x 27 x 28 x 30)
= 25!(1 + 26 + x02 + + y56 + z80)
= 84000000 x x65
= a0,000,000
Hence, given expression has 7 zeroes.
[email protected]
+91 9035001996