Posts

practice problems

Q1.  Find the number of integer solutions for | |x| - 2020| < 5 S1. |x| - 2020 = y => -5 < y < 5 => -5 < |x| - 2020 < 5 Part 1: -5 < |x| - 2020 => 2015 < |x| => x < -2015 or x > 2015 AND Part 2: |x| - 2020 < 5 => |x| < 2025 => -2025 < x < 2025 Combine both to get x = -2024... -2016 and x = 2016 to 2024 Answer: 18 Q2.  Find the sum of positive integers (n) for which |2^n + 5^n - 65|  is a perfect square. S2. for n = 1, y = 58 for n = 2, y = 36 = one solution found, n = 2 for n >= 3 y > 0 so we can remove absolute sign. 2^n + 5^n - 65 = k^2 Take mod 3 (-1)^n + (-1)^n = -1 + k^2 mod 3 If n is odd: -1 = 2 = k^2 mod 3 But k^2 mod 3 can be only 0,1. => n has to be even Let n = 2m and m>=2 y = 4^m + 25^m - 65 m = 2 => y = 16 + 625 - 65 = 576 = 24^2 => n = 4 is a solution. m = 3 => 4^3 + 25^3 - 65 = k^2 = 25^3 - 1 = 125^2 - 1 so not a square since you won't get 124^2 from here. For m>=4 => 4^m - 6...

practice problems

Image
Q1. Can product of eight consecutive integers be the perfect 4-th power of an integer? S1. n(n+1)(n+2)...(n+7) rearrange: n(n+7)(n+1)(n+6)(n+2)(n+5)(n+3)(n+4) Let a = n^2 + 7n + 6 Then product becomes: P = (a-6).a.(a+4).(a+6) = a^4 + 4a^3 -36a^2 - 144a (a+1)^4 = a^4 + 4a^3 + 6a^2 + 4a + 1 This is clearly more than the above product. Why? Since a is positive. (a+1)^4 > P Can we show a^4 < P? P = a^4 + 4a(a^2 - 9a - 36), a^2 - 9a - 36 = (a-12)(a+3) > 0  since a >= 14 for n = 1 => a^4 < P < (a+1)^4 H.P. that it can't be 4th power. Q2. S2. Evaluate the expression: Denominator would become: k(k+1) Numerator = k^4 + 2k^3 + 3k^2 + 2k + 1 = (k^2+k+1)^2 So each term is: (k^2 + k + 1)/(k^2 + k) = 1 + 1/k(k+1) 1/k(k+1) = 1/k - 1/k+1 Now upon addition: 1s add upto 40. And telescopic sum for the rest: 1/1 - 1/2 1/2 - 1/3 ..... 1/40 - 1/41 Add all to get: 1/1 - 1/41 = 40/41 So the final sum is 40 + 40/41 a + b = 80 = answer Another method: if x + y + z = 0 then: (1/x + 1/y ...

practice problems

Q1. A sequence has 1st term 2007 and the next term is the sum of the squares of the digits of the previous term. Find the sum of this sequence till 2013 terms. S1. Answer: 105336 Once you hit 89, then it will repeat again. So you have to sum that. Q2. [Morse–Thue Sequence] Start with 0. To each initial segment append its complement: 0, 01, 0110, 01101001, ... (a) Let the digits of the sequence be x(0), x(1), x(2) ..... Prove that x(2n)=x(n) x(2n+1)=1-x(2n). (b) Prove that x(n)=1 - x(n - 2^k), where 2^k is the largest power of 2 which is <= n. Find the 1993rd digit of the sequence. (c) Prove that the sequence is not periodic. (d) Write the nonnegative integers in base 2: 0,1,10,11... Now replace each number by the sum of its digits modulo 2. Prove that you obtain the Morse–Thue sequence. S2. Method 1: Let the sequence at any step be X_{k+1} = X_k.X'_k Where X'_k is the complement of X_k. So X_k has indices from 0 to 2^k - 1 And X'_k has indices from 2^k to 2^k + y where ...

practice problems

Q1. Second principle of induction: prove that for all natural numbers n (3 + sqrt(5))^n + (3 - sqrt(5))^n is an even integer. Let S_n = (3 + sqrt(5))^n + (3 - sqrt(5))^n a = 3 + rt(5) b = 3 - rt(5) a+b = 6 ab = 4 a,b are roots of x^2 - 6x + 4 = 0 => x^2 = 6x - 4 Multiply both sides with x^(n-1) => x^(n+1) = 6x^(n) - 4x^(n-1) replace x with a,b and add them together S_{n+1} = 6S_{n} - 4S_{n-1} For n=1,2 Sn is even. Using second principle of induction assume it's true till S_{k} including S_{k-1} and below. Then S_{k+1} = 6S_{k} - 4S_{k-1}is also even. H.P.

practice problems

Image
 Q1. S1. Method 1: sum = 0 i = 1, j = 1:1, k = 1:1 Add 1 i = 2, j = 1, k = 1:1 Add 1 i = 2, j = 2, k = 1:2 Add 2 First iteration we added: 1 Second:  (1+2) Third:  (1+2+3) Nth: . (1+2+3...+n) Adding all we get: 1 + (1+2) + (1+2+3) .... + (1+...n) = 1*n + 2*(n-1) .... 1*n = (k=1:n)Sigma (k*(n-k+1))  = sigma(nk - k^2 + k) = (n+1)*[n(n+1)]/2 - n(n+1)(2n+1)/6 = n(n+1)(n+2)/6 Method 2:  reduce it step by step: Triple sigma 1 = double sigma j = sigma i*(i+1)/2 then separate and do the sum. Q2. Find the sum of the products of every pair of the first n natural numbers. S2. 1*2 + 1*3 + 1*4 ... 1*n           2*3 + 2*4 ... 2*n ............................                                (n-1)*n = (k = n:2)Sigma(k * {k*(k-1)/2} = 1/2[sigma(n^3) - 1 - sigma(n^2) + 1] = 1/2[sigma(n^3) - sigma(n^2)] simplify from here and get the answer. Q3. Row 1: 1 Row 2:  2 3 Row 3:...

Diophantine m-tuple by Andrej Dujella

 for a,b positive integers if ab+ 1 = k^2 i.e. perfect square then if we use c = a + b + 2k then bc + 1 and ac + 1 will also be perfect squares.

Pell's equations

 x^2 - Dy^2 = 1 has infinitely many integer solutions (x,y) if D is a positive non-square integer. Trivial solution: (1,0) Fundamental solution: smallest positive values of x,y both of which are non-zero.