Wednesday, June 11, 2008

Last 2 digits of an Expression

Last 2 digits is the remainder when Divided by 100.
This can be found usind Binomial theorem.
The method described below is quick and is
an extension of the Binomial Theorem.

For expressions ending in '5'
Last 2 digits will always be 25.
For '1'
I will first so some examples and then follow them with an
explanation.
Take 41 ^ 73
The last digit/ the right most digit will always be 1
For the last but one digit take the ten's digit of the base i.e 4 in the above
example and multiply it will the unit's digit of the power i.e 3 in the example.
So 2.
The last 2 digits will be 21.
Some more examples.
31 ^ 123 =
Right most is one.
Last but one will be 3 (ten's digit of the base) * 3 (unit's digit of the power)=9
So last 2 digits will be 91
81 ^ 1423 = 41
Last but one here will be 8*3


For Numbers ending in 3,7,9

From the power cycles,
3 ^ 4k/4k+4 and 7 ^ 4k/4k+4 , 9 ^ 2k will end in 1.
So using this we can convert them into expressions ending in 1.
233 ^ 56
The last 2 digits will depend on 33 ^ 56
This becomes (33 ^ 4 ) ^ 14
33 ^ 4 is (33 ^ 2 ) * (33 ^ 2)
I have already written about quicker methods to get squares.
33 ^ 2 will end in 89
Finally we get 21 ^ 14
This can be found using the method explained for 1.


For expressions ending in even numbers

Some pointers to remember
1024 ^ even number will always end in 76
1024 ^ odd number will always end in 24
1024 is 2 ^ 10
For most expressions ending in an even number,
we can take 2 ^ x as common and express that as 10k+
Say we have 74 ^ 288
74 is 2 * 37
so we get (2 ^ 288)*(37^288)
2 ^ 288 will be (2 ^ 10)^28 * (2 ^ 8)
We can proceed with this
and use earlier methods to get 37 ^ 288.


Agreed it's not an easy method by any means.

Friday, June 6, 2008

Speed Maths 2

Squares of Numbers from 70-130
Let the Number be X such that X is between 70 and 130.
Step 1: X-100.
Add this value to X.
The value will be the left most 2 or 3(As the case maybe) digits of the answer.
Step 2: Square (X-100)
This will be the right most 2 digits.
In case you get 3 digits, carry over to the left digit.

Example:
1) Number is 82.
82-100 = -18
82-18=64
Now 18 ^ 2 is 324.
3 will be carried over to 4 and that becomes 67.
Answer is 6724

2) 112
112-100 = 12
112 + 12 =124
124 will be the 3 left most digits.
12 ^ 2 is 144.
1 will be carried over to the 4 and
the Answer is 12544

Thursday, June 5, 2008

Speed Maths 1

A small post.

For Finding squares of numbers between 30-70

Say the number is 'X' and X is between 30 and 70.

Step 1: Find x-25.
X-25 will be the first digit/first 2 digits of the required answer.
Step 2:Find (50-X)^2
This will be the right most 2 digits.In case the square is a 3 digit number,
carry it over .

Example: 43
43-25
=18
50-43
=7
7 ^ 2 = 49
43 ^ 2 is 1849

Example 2:35
35-25=10
50-35=15
15 ^ 2 =225
Answer: 10, from 225 25 will be the 2 right most digits and carry over 2 to the 0 on the left side
So it becomes 1225.

Answer: 1225

Tuesday, June 3, 2008

CoPrimes, Euler's Number and Fermat's theorem

Co-Primes are very important , when it comes to finding remainders.
First things first, What is a Co-Prime ?
2 numbers are said to be co-primes/relatively prime if their HCF is 1.
That is the 2 numbers have no other common factor apart from the number.

Co-Primes by themselves serve no purpose.You need to use them with
Fermat's theorem / Chinese Remainder Theorem etc.

Fermat's theorem states that
Remainder (x ^ ( Euler's Number of N) )/N ) = 1
Here X and N have to Co-Primes.

Now , what is Euler's Number?
Euler's number of a particular number is the number of co-primes less than
the number. The total number of co-primes that a certain number can have
is infinite. So we need to determine the number of coprimes less than the number.
Euler's number for a prime number P is P-1. As all numbers less than that
prime number will coprimes of the prime number. As in 1,2,3,4,5,6 will all be
coprimes of 7.

For other numbers :
Euler's Number of a number X = X(1-1/a)(1-1/b)....
Here a and b are the prime factors of the number.
We look at the number of the prime numbers that are factors of the given number.
We ignore the number of times the prime number occurs.
So say the number is 18.
18 has 2 and 3 as factors.
So Eulers No of 18 = 18(1-1/2)(1-1/3)
= 6

So if we get a sum like ,
Find the remainder when (11 ^ 97 )/7
1)See if 11 and 7 are relatively prime to each other
2)If they are relatively prime, Find the Euler's number of the denominator.
3)Express power in terms of the euler's number.
For eg, in this case the Euler's number for 7 is 6.
So 97 = 6k+1.
We know that if we can factorize the numerator in a division, the end remainder
will be the product of the remainders of each individual factor.
So this becomes (11 ^ 6)/7.....(16 times)* (11 ^ 1)/7
Now as per Fermat's theorem,
(11 ^ 6) /7 is 1.
So the answer is the remainder when (11^1) is divided by 7.
This can be used when the numerator can be factorized.
This can be used when the numerator and the denominator are co-primes/relatively prime.
Now The question arises what is they are not coprimes.
If 2 numbers are not co-primes,it means they have a common factor.
See if you can remove the common factor from both the numerator and denominator.

In case that can't be done , we will have to use other methods to find the remainder.

Monday, June 2, 2008

Tests for Divisibility

Test for Divisibility:
This again is a very basic topic.
Most of u know the tests to check divisibility.
But how many of us know why those particular methods are employed ?
After the class, the logic behind the tests look so simple and I feel dumb
for not having realised this earlier.I guess most of you know the reason
as well. But I am sure there will be a fair number who don't know why.
For their sake, I am making this post.

For 3,9
Everybody knows that for 3 and 9 we find the digitsum and see if that
digit sum is divisible by 3 or 9 , whatever the case maybe.
Let us take a 2 digit number.
A two digit can be written as 10A+B
10A+B=9A+A+B
Now, 9A is always divisible by 3/9.So whether the number is divisible by 3 or 9
depends on A+B.
Any number will be of the form 10 ^ 3 A + 10 ^ 2 B + 10 C+10^0 D .....................
If we divide each co-efficient (i.e 10 ^ 0 , 10 ^ 1 , 10 ^ 2 ............) by 9, the remainder is +1.
That is why we add all the digits.

For 11,7..
Taking the previous example.
10 ^ 3 A + 10 ^ 2 B + 10 C+10^0 D
If we divide 10^0 by 11 remainder is +1.
if we divide 10 ^ 1 by 11 remainder is -1 or (10)
If we divide 10 ^ 2 by 11 remainder is + 1
If we divide 10 ^ 3 by 11 remainder is -1.
We see that for 11, it alternates between + and -.
That is why we use the difference of the sum of odd terms and sum of even terms and see if that difference
is divisible by 11.
For 7.
10 ^ 3 A + 10 ^ 2 B + 10 C+10^0 D
If we divide 10^0 by 7 remainder is +1.
if we divide 10 ^ 1 by 7 remainder is 3
If we divide 10 ^ 2 by 7 remainder is + 2
If we divide 10 ^ 3 by 7 remainder is -1 or (6)
Here we see the same pattern as in 11, but for every 3 digits.
Thats why for 7 we use difference of sum of alternate triplets.
The same holds good for 13 .

For 5,25,125.......
The first power of ten that exactly divides 5 is 1.
That is why we use the last digit of a number to see if it is
divisible by 5.
The first power of ten that exactly divides 25 is 2.
That is why we use the last 2 digits of a number to see if it is
divisible by 25
The first power of ten that exactly divides 125 is 3.
That is why we use the last 3 digits of a number to see if it is
divisible by 125

The first power of ten that exactly divides 4 is 2.
That is why we use the last 2 digits of a number to see if it is
divisible by 4
The first power of ten that exactly divides 8 is 3.
That is why we use the last 3 digits of a number to see if it is
divisible by 8