Thursday, April 4, 2024

2024/022) N is a 50 digit no. all digit except the 26^th (from left) are 1.if n is divisible by 13,find the 26^th digit?

Let the $26^{th}$ digit be k

so $N = 1111\cdots( 50\, times) + (k-1) * 10^{24}$

or $N = \frac{10^{50}-1}{9} + (k-1) * 10^{24}$

or     $9N = 10^{50}-1 + 9 *  ((k-1) * 10^{24})$

because $GCD(9,13)=1$ so if n is divisible by 13 9N is divisible by 13.

as 13 ia prime we have

$10^{12} \equiv 1 \pmod {13}$

so  

$10{24} \equiv 1 \pmod {13}\cdots(1)$

 and

$10{48} \equiv 1 \pmod {13}$

hence

 $10{50} \equiv 100 \pmod {13}$

 or

 $10{50} \equiv 9 \pmod {13}$

$9N = 10^{50}-1 + 9 *  ((k-1) * 10^{24}) \pmod {13}$

$= 9-1  + 9 *  ((k-1) * 1) \pmod {13}$

 $= 9k -1 \pmod {13}$

this is zero and because k is a digit trying from 0 to 9 we get k=3 satisfies the condition

so the $26^{th}$ digit is 3 

Saturday, March 30, 2024

2024/021) Show that $\sin 3\theta = \sin \theta + 2 \sin \theta \cos 2\theta$ and use it to prove $\sin \frac{\pi}{9} + 2 \sin \frac{\pi}{9} \cos \frac{2\pi}{9} = \frac{\sqrt{3}}{2}$

LHS

$= \sin 3 \theta = \sin ( \theta + 2\theta) = \ sin \theta \cos 2 \theta + \cos \theta \sin 2\theta$ usng $\sin(A+B)$ formula 

$= \ sin \theta \cos 2 \theta + \cos \theta (2\sin \theta \cos \theta)$ using $\sin 2\theta$ formula

$= \ sin \theta (\cos 2 \theta + 2  \cos^2  \theta)$

$= \ sin \theta ( 2 \cos 2 \theta +  \cos 2  \theta + 1 )$ using formula for $\cos 2\theta$

$= \ sin \theta ( 2 \cos 2 \theta +   1 )$

$= 2 \ sin \theta  \cos 2 \theta +  \sin   \theta $ which is RHS

In the above putting $\theta = \frac{\pi}{3}$  we get

$\sin \frac{\pi}{9} +  2 \sin \frac{\pi}{9} \cos \frac{2\pi}{9} = \sin \frac{\pi}{3} = \frac{\sqrt{3}}{2}$

 

Sunday, March 24, 2024

2024/020) Show that there are infinitely many composite numbers of the form $10^n +3$ (n = 1, 2, 3, ... ).

If n = 2 we have $10^2+3 = 103$ this is divisible by 103 . 

Hence  $10^2 + 3 = 0 \pmod {103}\cdots(1)$

We know that 103 is a prime but we shall use this as a starting point to show that there are infinite numbers of the form $10^n+3$ is divisible by 103.

As 103 is a prime so using Fermats little theorem

$10^{102} = - 1 \pmod {103}$

Squaring both sides we get

$10^{204} =  1 \pmod {103}$

So from (1) and above we have

$10^{204n + 2} + 3=  0 \pmod {103}$

except for n = 0 when the value is 103 all other values are above 103 and have a factor 103 so not a prime

So there are infinitely many composite numbers as they are divisible by 103. We have not taken all cases and have found infinitely many composite numbers. Hence proved

 


2024/019) Given $a_n = 6^n + 8^n$ find the remainder when $a_{83}$ is divided by 49

 We shall use Euler's theorem that is a generalization of Fermat's little theorem: For any n and any integer a coprime to n, one has 

$a^{\phi(n)} \equiv -1 \pmod n$

Where $\phi(n)$ is number of numbers that is co-prime to n,

Let us compute $\phi(49)$ 

If $n = p_1^{k_1}p_2^{k_2}p_3^{k-3}  ... $ when each $p_i$ is  prime then

 $\phi(n)=n(1-\frac{1}{p_1})(1-\frac{1}{p_2})(1-\frac{1}{p_3})$

As $49= 7^2$ so $\phi(49) = 49 * (1-\frac{1}{7}) = 49 * \frac{6}{7} = 42$

Hence  

$6^{\phi(49)} \equiv -1 \pmod {49}n$

or $6^{(42)} \equiv -1 \pmod {49}$

Squaring both sides

 $6^{(84)} \equiv 1 \pmod {49}$

Dividing by 6 we get

  $6^{(83)} \equiv \frac{1}{6} \pmod {49}\cdots(1)$

Where $\frac{1}{6}} is not fraction but inverse of 6 mod 49

Similarly

  $8^{(83)} \equiv \frac{1}{8} \pmod {49}\cdots(2)$

 Adding (1) and(2) we get 

  $6^{(83)}+ 8^{(83)} \equiv \frac{1}{6}  + \frac{1}{8} \pmod {49}\cdots(2)$

Now $\frac{1}{6}  + \frac{1}{8} \pmod {49}$

$= \frac{8 + 6}{48} \pmod{49}$

$= \frac{14}{48} \pmod{49}$

$= \frac{14}{-1} \pmod{49}$ as $48 \equiv -1 \pmod {49}$

$= -14 \pmod{49}$

$=35$ taking positive number 

Hence remainder = 35 

Sunday, March 17, 2024

2024/018) There are 1000 coins -- 999 are fair, and 1 has heads on both sides. You randomly choose a coin and flip it 10 times. Miraculously, all 10 flips turn up heads. What is the probability that you chose the unfair coin

Probability that you choose one unfair coin = $\frac{1}{1000}$

iI you choose one unfair coin the probability that all 10 heads come = 1

So   Probability that you choose one unfair coin and all heads come = $\frac{1}{1000}$

Probability that you choose one fair coin = $\frac{999}{1000}$

If you choose one fair  coin the probability that all 10 heads come = $\frac{1}{2^{20}} = \frac{1}{1024}$

So   Probability that you choose one fair coin and all heads come = $\frac{999}{1024*1000}$

 So probability that all heads come = $\frac{999}{1024*1000} + \frac{1}{1000} = \frac{2023}{1024000}$

 So probability that coin is unfiar = $\frac{\frac{1}{1000}}{\frac{2023}{1024000}}=\frac{1024}{2023}$

 

Saturday, March 2, 2024

2024/017) integrate sin ax cos bx

We have $\sin \, ax + \cos \, bx = \frac{1}{2} (\sin (a+b) x + \sin (a-b) x$

Knowing that 

$\frac{d}{dx} \ cos \, nx = - n \sin \, nx$

Hence $\int  (\sin \, ax  \cos \, bx) dx  = \int (\frac{1}{2} (\sin (a+b) x + \sin (a-b) x)dx $ 

= $\frac{\cos(a+b)x}{a+b} - \frac{\cos(a-b)x}{a-b} + C $ 


Friday, February 23, 2024

2024/016) Prove that product of 4 consecutive positive integers cannot be a perfect cube.

Proof;

We  shall use the fact that if x and y are co-prime then xy is a perfect cube if both  x and y are perfect cubes.

Let the 1st number be x so the product is $x(x+1)(x+2)(x+3)$

Either x is odd or even

If x is odd then we have $GCD(x,x+2) = GCD(x+1, x+2) = GCD(x+2,x+3) = 1$

For x + 2 to be a perfect cube minimum x is 6 

So $GCD(x+2,x(+1)(x+2)) = 1$

So we need to prove that $x(x+1)(x+3)$ is not a perfect cube.

$x(x+1)(x+3) = x^3 + 4x^2 + 3$

We have $x(x+3) - (x-1)^2 = x^3+3x - x^2 -2x -1=  x-1 > 0$ as x is minimum 6 

So $x(x+1)(x+3) >= (x+1)^3$

  $x^3 + 4x^2 + 3$ is below  $(x+2)^3 = x^3 + 6x^2 + 12x + 8$

As it is between 2 cubes it cannot be a cube

Similarly we can prove taking $x +1$ when $x$ is even