Skip to main content

Orders and Primitive roots

 Theory

 We know what Fermat's little theorem states.
If $p$ is a prime number, then for any integer $a$, the number $a^p − a$ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as \[a^{p}\equiv a{\pmod {p}}.\]
So, essentially, for every $(a,m)=1$, ${a}^{\phi (m)}\equiv 1 \pmod {m}$. But $\phi (m)$ isn't necessarily the smallest exponent. For example, we know $4^{12}\equiv 1\mod 13$ but so is $4^6$. So, we care about the "smallest" exponent $d$ such that $a^d\equiv 1\mod m$ given $(a,m)=1$. 

Orders

Given a prime $p$, the order of an integer $a$ modulo $p$, $p\nmid a$, is the smallest positive integer $d$, such that $a^d \equiv 1 \pmod p$. This is denoted $\text{ord}_p(a) = d$.
If $p$ is a primes and $p\nmid a$, let $d$ be order of $a$ mod $p$. Then $a^n\equiv 1\pmod p\implies d|n$.
Let $n=pd+r, r\ll d$. Which implies $a^r\equiv 1\pmod p.$ But $d$ is the smallest natural number. So $r=0$. So $d|n$.
Show that $n$ divides $\phi(a^n-1)$ for $n>2, a>2$.
Note that $\gcd(a,a^n-1)=1$. Moreover, order of $a\pmod {a^n-1}$ is $n$. But $a^{\phi{a^n-1})}\equiv 1 \pmod {a^n-1}.$ So, $n|\phi{a^n-1}$.
Determine all $n$ such that $n | 2^n -1$
We use a very common "trick". Which is to select the smallest prime $p$ which divides $n$.
Clearly $n$ is odd. \newline The main thing to observe here is, $\gcd(p -1, n) = 1$ and so $ord_p (2)$ must equal $1$ as $p|2^n-1\implies \text{ord}_p(2)|n$ but $\text{ord}_p(2)|\phi(p)=p-1\implies \text{ord}_p(2)|\gcd(n,p-1)=1\implies p|2-1=1 $. And $n=1$ works and is the only solution.
Prove that every divisor of $2^p - 1$ is greater than $p$.
Well, let's just try for every prime divisor. If we can show it for prime divisor then we are done!
Let $q|2^p-1$. The $\text{ord}_q(2)=1\text{ or } p$. If $1$ then $q|1$, not possible. So $\text{ord}_q(2)=p\implies p|q-1\implies p\ll q-1\ll q .$
Prove that any prime factor of $2^{2^n} + 1$ is congruent to $1$ modulo $2^{n+1}$ .
Say $p|2^{2^n} + 1$. So $$2^{2^n}\equiv -1\pmod p\implies 2^{2^{n+1}}\equiv 1\pmod p$$ $$\implies \text{ord}_p(2)=2^{n+1}\implies 2^{n+1}|p-1\implies p\equiv 1 \pmod {2^{n+1}}.$$
Could you figure out how we concluded $ord_p(2)=2^{n+1}$?
So, these are essentially all the tricks using just orders. Let's go to something new called "primitive roots". 

Primitive Roots

Given a positive integer $n$. If $\text{ord}_n(g) = \phi(n)$ then $g$ is a primitive root modulo $n$.
What is the primitive root of $3$? What about $4$? What about $8$? What about $15$?
The thing is, primitive roots do not exist for every number. Infact, there is a nice classification of numbers who have primitive roots.
A primitive root exists modulo $n$ if and only if $n = 1, n = 2, n = 4$ or if $n$ is in the form $p^k$ or $2p^k$ for some positive integer $k$ and odd prime $p$.
We will not prove it here. The proof is very famous and can be found in any Undergraduate Number theory textbook. Now, primitive roots are really special and they have pretty nice properties.
Given a prime $p$ and a primitive root $g$ modulo $p$, the set $\{g^1,g^2,\dots, g^{p-1}\}$ forms a complete set of residues modulo $p$.
Suppose not. By Php, there exists $g^i\equiv g^j\pmod p$ and $i\le j\le p. $ Then $g^{j-1}\equiv 1\pmod p$ and $j-1\le p-1$. Not possible unless $j=i$.
Given a prime $p$, then $$(p - 1)! \equiv -1 \pmod p.$$
Note that $$(p-1)!\equiv (p-1)(p-2)\dots 1 \equiv g^1\dot g^2\dot \dots g^{p-1}$$ $$g^{\frac{p(p-1)}{2}}\pmod p$$ $$(-1)^p\equiv -1 \pmod p$$
Why is $g^{(p-1)/2}\equiv -1\pmod p$?

Some important lemmas(?)

If $p$ is a prime. Then for any integer $x$, $$1^x+2^x+3^x+\dots+(p-1)^x\equiv 0 \pmod p\text{ if } p-1\nmid x, .$$ It is $0$ when $p-1\mid x$.
Note that $$1^x+2^x+3^x+\dots+(p-1)^x\equiv g^x+g^{2x}+\dots+g^{(p-1)x}$$ $$\equiv g^x\cdot \frac {g^{(p-1)x}-1}{g^x-1}\pmod p.$$ If $p-1\nmid x$ then it is $0$. However, for $p-1|x$ we get denominator to be $0,$ but then just putting that in the original form gives us $p-1$ $1$'s. So $p-1$.
Show that there are exactly $\phi(p - 1)$ primitive roots modulo $p$.
Well, let us fix primitive root $g$. Then other primitive roots will be of the form $g^k$. For $g^k$ to be a primitive root, Note $\gcd(k,p-i)$. (why?). And it is a sufficient codition. So $\phi(p-1)$ such roots.
Let $p$ be an odd prime. Then there exists an integer $n$ such that $p | n^2 + 1$ if and only if $ p \equiv 1 \pmod 4$
Let $$p|n^2+1\implies n^2\equiv -1\pmod p\implies n^4\equiv 1\pmod p\implies \text{ord}_p(n)=4.$$ So $4|p-1\implies p$. So $p\equiv 1\pmod 4$. For other direction, we know that there exists a primitive root $g$. Note that $$g^{(p-1)/2}\equiv -1\pmod p.$$ Let $n=\pm (p-1)/4\pmod p$. That works.
We begin with something called $v_p$. It is the p-adic evaluation of a number modulo $p$. If $p^k|a$ and $p^{k+1}\nmid a$ then $v_p(a)=k$.
Note the general properties:
  • $v_p(xy)=v_p(x)+v_p(y)$
  • $v_p(x+y)\ge \min( v_p(x),v_p(y))$. If $v_p(x)\ne v_p(y)$ then equality holds.
$$v_p(a^n-b^n)=v_p(n)+v(a-b)$$ if
  • $p|a-b, p\ne 2$ an odd prime
  • $p\nmid a,b$
We use induction on $v_p(n).$ [ We show for $v_p(n)=0, v_p(n)=1$ and then use induction. 1. We show it for $v_p(n)=0.$ That is show $v_p(x^n-y^n)=v_p(x-y)$ To show this is true, $$v_p(\frac{x^n-y^n}{x-y})=v_p(x^{n-1}+yx^{n-2}+y^2x^{n-3}+\dots+y^{n-1})=0.$$ As $x\equiv y\pmod p.$ So, $$x^{n-1}+yx^{n-2}+y^2x^{n-3}+\dots+y^{n-1}\equiv nx^{n-1}\pmod p. $$ And $p\not\mid nx^{n-1}$ 2. We show it for $v_p(n)=1.$ That is show $v_p(x^n-y^n)=v_p(x-y)+1$ To show this is true, $$v_p(\frac{x^n-y^n}{x-y})=v_p(x^{n-1}+yx^{n-2}+y^2x^{n-3}+\dots+y^{n-1})=1.$$ As $x\equiv y\pmod p\implies x=y+pk$ So, $$x^{n-1}+yx^{n-2}+y^2x^{n-3}+\dots+y^{n-1}\pmod {p^2} $$ $$\equiv (pk+y)^{n-1}+(pk+y)^{n-2}y+(pk+y)^{n-3}y^2+\dots+y^{n-1}\pmod {p^2}$$ $$\equiv (y^{n-1}+pk\cdot (n-1)y^{n-2})+(y^{n-1}+ypk\cdot (n-2)y^{n-3})+\dots+y^{n-1}\pmod {p^2}$$ $$\equiv n\cdot y^{n-1}+pky^{n-2}\frac{(n-1)(n)}{2} \pmod {p^2}$$ Since $(n,p^2)=p.$ Let $n'=n/p.$ $$\equiv n'\cdot y+k\frac{(n-1)(n)}{2} \pmod {p}$$ but $p\not \mid n'\cdot y+k\frac{(n-1)(n)}{2}$ 3. Let's assume it's true for $v_p=0,1,\dots, j-1.$ Now, we will show it's true for $v_p(n)=j.$ Then let $n=p^j\cdot c.$ Then $$v_p(x^n-y^n)=v_p(x^{p^j\cdot c}-y^{p^j\cdot c})=v_p((x^{p})^{p^{j-1}\cdot c}-(y^{p})^{p^{j-1}\cdot c})$$ $$=v_p(x^p-y^p)+v_p(p^{j-1}\cdot c)=v_p(x-y)+1+j-1=v_p(x-y)+v_p(n)$$

Problems

As usual, let $\sigma (N)$ denote the sum of all the (positive integral) divisors of $N.$ (Included among these divisors are $1$ and $N$ itself.) For example, if $p$ is a prime, then $\sigma (p)=p+1.$ Motivated by the notion of a "perfect" number, a positive integer $N$ is called "quasiperfect" if $\sigma (N) =2N+1.$ Prove that every quasiperfect number is the square of an odd integer.
Let $n=p_1^{e_1}\dots p_k^{e_k}$ be the prime factorization of $n$. Then we have$$\sigma(n)=\prod_{i=1}^k (1+p_i+p_i^2+\dots+p_i^{e_i}),$$so for any odd prime $p_j$, if $e_j$ is odd, then $(1+p_j+\dots+p_j^{e_j})$ is even, contradiction since $\sigma(n)$ is odd. Thus we have $n=2^e m^2$ for some non-negative integer $e$ and odd positive integer $m$. Now$$\sigma(n)=(2^{e+1}-1)\sigma(m^2)=2^{e+1}m^2+1.$$ From this we get$$(2^{e+1}-1)(\sigma(m^2)-m^2)=m^2+1.$$If $e>0$, then $2^{e+1}-1\equiv 3\pmod{4}$, so $2^{e+1}-1$ has at least one prime divisor $p$ that is $3\pmod{4}$. By Fermat's Christmas Theorem, this is a contradiction, since $p\mid m^2+1$. Thus $e=0$, and $n=m^2$.
Determine all integers $ n > 1$ such that $$\frac {2^n + 1}{n^2}$$ is an integer.
First note that all even $n$ fail, and $n = 1$ can be checked to work. Now we wish to determine all $n$ such that $2^n \equiv -1 \pmod{n^2}$. Take the smallest prime $p \mid n$. Then we require, \begin{align*} 2^{2n} \equiv 1 \pmod{p} \end{align*}Hence $\text{ord}_p(2) \mid \gcd(2n, p - 1)$. Note that $p-1$ and $n$ are coprime and hence $\gcd(2n, p - 1) = 2$, as $p > 2$. Now take cases. First if $\text{ord}_p(2) = 1$ we require, \begin{align*} 2 \equiv 1 \pmod{p} \end{align*}which obviously fails. Then we must have $\text{ord}_p(2) = 2$ and hence, \begin{align*} 4 \equiv 1 \pmod{p} \implies p = 3 \end{align*}Thus we have $n = 3k$ for some $k$. Then our desired condition becomes, \begin{align*} 9k^2 \mid 8^k + 1 \end{align*}Now we can use LTE to find $\nu_3(8^k + 1) = 2 + \nu_3(k)$. However we also have $\nu_3(9k^2) = 2 + 2\nu_3(k)$. Clearly then we must have, \begin{align*} 2 + \nu_3(k) \geq 2 + 2\nu_3(k) \iff 0 \geq \nu_3(k) \end{align*}whence equality must occur. Thus $k$ is relatively prime to $3$. Now take the smallest prime $p \neq 3$ dividing $k$. Then we must have, \begin{align*} 8^{2k} \equiv 1 \pmod{p} \end{align*}Then $\text{ord}_p(8) \mid \gcd(2k, p-1)$. Clearly $\gcd(k, p-1) = 1$ and hence $\text{ord}_p(8) \mid 2$. Taking cases once more we can easily see that both imply that $7 \mid k$. However if $7 \mid k$, then we can easily see that $8^k + 1 \equiv 2 \pmod{7}$, a contradiction. Thus $k$ has no prime divisors, and thus $k = 1$. Therefore $n = 3k = 3$. Then our final solution set is $\boxed{n = 1 \text{ and } n = 3}$.
Find all primes $ p,q $ such that $ \alpha^{3pq} -\alpha \equiv 0 \pmod {3pq} $ for all integers $ \alpha $.
First notice how $3, p, q$ are distinct. Assume $p = q$. Then $n^{3p^2} \equiv n \pmod{p^2}, \forall n \in \mathbb{Z^+}$. However if $n = p$, then we have that $p^{3p^2} \equiv p \pmod{p^2} \implies p^{3p^2 - 1} \equiv 1 \pmod{\frac{p^2}{\operatorname{gcd}(p, p^2)}} \implies 0 \equiv 1 \pmod p$, which is nonsense. Now let $g_1, g_2$ be primitive roots modulo $p, q$ respectively. Then $g_1^{3qp} \equiv g_1 \pmod p \implies p - 1 \mid 3pq - 1$. Similarly $q -1 \mid 3pq - 1$. Thus we have that $p - 1 \mid 3q - 1$ and $q - 1 \mid 3p - 1$. Let $3q - 1 = x(p - 1), 3p - 1 = y(q - 1)$, for some $x, y \in \mathbb N$. Now notice that $1 \leq x \leq 3$. If $x = 1$, we have that $3q - 1 = p - 1 \implies 3q = p$, which is absurd. If also $x = 3$, we have $3q - 1 = 3p - 3$. Reducing modulo $3$ gives us $2 \equiv 0 \pmod 3$. Another fallacy. Hence $x = 2$. Now then $3q - 1 = 2p - 1$ and $3p - 1 = y(q - 1)$. Solving for $q$ in the system of equations gives us $q = \frac{2y + 1}{2y - 9}$. Now $\frac{2y + 1}{2y - 9} = 1 + \frac{10}{2y - 9}$. Thus $y = 5, 7$. If $y = 5$ then $q = 11$ and $p = 17$. If $y = 7$, then $q = 3$ and $p = 5$. However $3, p, q$ are distinct, and so we can only have that $\boxed{(p, q) = (11, 17)}$ as the only solution.
Prove that for no integer $ n$ is $ n^7 + 7$ a perfect square.
Note that it is easy to see $n \leq 0$ fail. Now take $n \geq 1$ and assume,$$n^7 + 7 = a^2$$for some square $a$. Now as perfect squares are $0$ and $1$ modulo $4$ we can easily show that $n \equiv 1 \pmod{4}$. Then adding $121$ to both sides we wish to find solutions to$$n^7 + 2^7 = a^2 + 11^2$$Now we factor the left hand side to find$$(n+2)(\dots) = a^2 + 11^2$$and hence there exists some prime congruent to $3$ modulo $4$ dividing the right hand side. Hence there exists some prime $p$ dividing $a^2 + 11^2$. Now by Fermat's Christmas Theorem we must have $p \mid \gcd(a^2,11^2)$. However this implies that $\gcd(a^2, 11^2) > 1$ and namely $p = 11$. Then we have$$n^7 + 2^7 = 11^2(b^2 + 1)$$ Finally note that LTE gives, \begin{align*} \nu_{11}(n^7 + 2^7) = \nu_{11}(n+2) \end{align*} Then as the left hand side has an odd $\nu_{11}$ and the right hand side has an even $\nu_{11}$ we have reached our desired contradiction.
Well, hope you learnt something!

Comments

  1. In lemma 4, shouldn't there be $g^{j-i}$?

    ReplyDelete
    Replies
    1. yes, correct. Was a typo. Will correct whenever free. Thanks.

      Delete

  2. I read your post and this blog is very good.
    You have provided good knowledge in this blog.
    This blog really impressed me.
    Thank you for sharing your knowledge with all of us.

    ReplyDelete

Post a Comment

Popular posts from this blog

My experiences at EGMO, IMOTC and PROMYS experience

Yes, I know. This post should have been posted like 2 months ago. Okay okay, sorry. But yeah, I was just waiting for everything to be over and I was lazy. ( sorry ) You know, the transitioning period from high school to college is very weird. I will join CMI( Chennai Mathematical  Institue) for bsc maths and cs degree. And I am very scared. Like very very scared. No, not about making new friends and all. I don't care about that part because I know a decent amount of CMI people already.  What I am scared of is whether I will be able to handle the coursework and get good grades T_T Anyways, here's my EGMO PDC, EGMO, IMOTC and PROMYS experience. Yes, a lot of stuff. My EGMO experience is a lot and I wrote a lot of details, IMOTC and PROMYS is just a few paras. Oh to those, who don't know me or are reading for the first time. I am Sunaina Pati. I was IND2 at EGMO 2023 which was held in Slovenia. I was also invited to the IMOTC or International Mathematical Olympiad Training Cam...

Geometry ( Finally!!!)

 This is just such an unfair blog.  Like if one goes through this blog, one can notice how dominated  Algebra is!! Like 6 out of 9 blog post is Algebra dominated -_- Where as I am not a fan of Algebra, compared to other genres of Olympiad Math(as of now). And this was just injustice for Synthetic Geo. So this time , go geo!!!!!!!!!!!  These problems are randomly from A Beautiful Journey through Olympiad Geometry.  Also perhaps I will post geo after March, because I am studying combi.  Problem:  Let $ABC$ be an acute triangle where $\angle BAC = 60^{\circ}$. Prove that if the Euler’s line of $\triangle ABC$ intersects $AB$ and $AC$ at $D$ and $E$, respectively, then $\triangle ADE$ is equilateral. Solution:  Since $\angle A=60^{\circ}$ , we get $AH=2R\cos A=R=AO$. So $\angle EHA=\angle DOA.$ Also it's well known that $H$ and $O $ isogonal conjugates.$\angle OAD =\angle EAH.$ By $ASA$ congruence, we get $AE=AD.$ Hence $\triangle ADE$ is equilateral....

Just spam combo problems cause why not

This post is mainly for Rohan Bhaiya. He gave me/EGMO contestants a lot and lots of problems. Here are solutions to a very few of them.  To Rohan Bhaiya: I just wrote the sketch/proofs here cause why not :P. I did a few more extra problems so yeah.  I sort of sorted the problems into different sub-areas, but it's just better to try all of them! I did try some more combo problems outside this but I tried them in my tablet and worked there itself. So latexing was tough. Algorithms  "Just find the algorithm" they said and they died.  References:  Algorithms Pset by Abhay Bestrapalli Algorithms by Cody Johnson Problem1: Suppose the positive integer $n$ is odd. First Al writes the numbers $1, 2,\dots, 2n$ on the blackboard. Then he picks any two numbers $a, b$ erases them, and writes, instead, $|a - b|$. Prove that an odd number will remain at the end.  Proof: Well, we go $\mod 2$. Note that $$|a-b|\equiv a+b\mod 2\implies \text{ the final number is }1+2+\dots ...

IMO Shortlist 2021 C1

 I am planning to do at least one ISL every day so that I do not lose my Olympiad touch (and also they are fun to think about!). Today, I tried the 2021 IMO shortlist C1.  (2021 ISL C1) Let $S$ be an infinite set of positive integers, such that there exist four pairwise distinct $a,b,c,d \in S$ with $\gcd(a,b) \neq \gcd(c,d)$. Prove that there exist three pairwise distinct $x,y,z \in S$ such that $\gcd(x,y)=\gcd(y,z) \neq \gcd(z,x)$. Suppose not. Then any $3$ elements $x,y,z\in S$ will be $(x,y)=(y,z)=(x,z)$ or $(x,y)\ne (y,z)\ne (x,z)$. There exists an infinite set $T$ such that $\forall x,y\in T,(x,y)=d,$ where $d$ is constant. Fix a random element $a$. Note that $(x,a)|a$. So $(x,a)\le a$.Since there are infinite elements and finite many possibilities for the gcd (atmost $a$). So $\exists$ set $T$ which is infinite such that $\forall b_1,b_2\in T$ $$(a,b_1)=(a,b_2)=d.$$ Note that if $(b_1,b_2)\ne d$ then we get a contradiction as we get a set satisfying the proble...

Some Geometry Problems for everyone to try!

 These problems are INMO~ish level. So trying this would be a good practice for INMO!  Let $ABCD$ be a quadrilateral. Let $M,N,P,Q$ be the midpoints of sides $AB,BC,CD,DA$. Prove that $MNPQ$ is a parallelogram. Consider $\Delta ABD$ and $\Delta BDC$ .Note that $NP||BD||MQ$. Similarly, $NM||AC||PQ$. Hence the parallelogram. In $\Delta ABC$, $\angle A$ be right. Let $D$ be the foot of the altitude from $A$ onto $BC$. Prove that $AD^2=BD\cdot CD$. Note that $\Delta ADB\sim \Delta CDA$. So by similarity, we have $$\frac{AD}{BD}=\frac{CD}{AD}.$$ In $\Delta ABC$, $\angle A$ be right. Let $D$ be the foot of the altitude from $A$ onto $BC$. Prove that $AD^2=BD\cdot CD$. Let $D\in CA$, such that $AD = AB$.Note that $BD||AS$. So by the Thales’ Proportionality Theorem, we are done! Given $\Delta ABC$, construct equilateral triangles $\Delta BCD,\Delta CAE,\Delta ABF$ outside of $\Delta ABC$. Prove that $AD=BE=CF$. This is just congruence. N...

Number Theory Revise part 1

I thought to revise David Burton and try out some problems which I didn't do. It's been almost 2 years since I touched that book so let's see! Also, this set of problems/notes is quite weird since it's actually a memory lane. You will get to know on your own! I started with proving a problem, remembered another problem and then another and so on! It was quite fun cause all these questions were the ones I really wanted to solve! And this is part1 or else the post would be too long. Problem1: Prove that for $n\ge 1$  $$\binom{n}{r}<\binom{n}{r+1}$$ iff $0\le r\le \frac{n-1}{2}$ Proof: We show that $\binom{n}{r}<\binom{n}{r+1}$ for $0\le r\le \frac{n-1}{2}$ and use the fact that $$\binom{n}{n-r}=\binom{n}{r}$$ Note that $\binom{n}{r}= \frac{n!}{r!(n-r)!}, \binom{n}{r+1}=\frac{n!}{(r+1)!(n-r-1)!}$  Comparing, it's enough to show that $$\frac{1}{n-r}<\frac{1}{r+1}\text{ or show } n-r>r+1$$ which is true as $0\le r\le \frac{n-1}{2}$ Problem2: Show that the exp...

Problems with meeting people!

Yeah, I did some problems and here are a few of them! I hope you guys try them! Putnam, 2018 B3 Find all positive integers $n < 10^{100}$ for which simultaneously $n$ divides $2^n$, $n-1$ divides $2^n - 1$, and $n-2$ divides $2^n - 2$. Proof We have $$n|2^n\implies n=2^a\implies 2^a-1|2^n-1\implies a|n\implies a=2^b$$ $$\implies 2^{2^b}-2|2^{2^a}-2\implies 2^b-1|2^a-1\implies b|a\implies b=2^c.$$ Then simply bounding. USAMO 1987 Determine all solutions in non-zero integers $a$ and $b$ of the equation $$(a^2+b)(a+b^2) = (a-b)^3.$$ Proof We get $$ 2b^2+(a^2-3a)b+(a+3a^2)=0\implies b = \frac{3a-a^2\pm\sqrt{a^4-6a^3-15a^2-8a}}{4}$$ $$\implies a^4-6a^3-15a^2-8a=a(a-8)(a+1)^2\text{ a perfect square}$$ $$\implies a(a-8)=k^2\implies a^2-8a-k^2=0\implies \implies a=\frac{8\pm\sqrt{64+4k^2}}{2}=4\pm\sqrt{16+k^2}. $$ $$ 16+k^2=m^2\implies (m-k)(m+k)=16.$$ Now just bash. USAMO 1988 Suppose that the set $\{1,2,\cdots, 1998\}$ has been partitioned into disjoint pairs $\{a_i,b_i\}$ ($1...

Problems I did this week [Jan8-Jan14]

Yeyy!! I am being so consistent with my posts~~ Here are a few problems I did the past week and yeah INMO going to happen soon :) All the best to everyone who is writing!  I wont be trying any new problems and will simply revise stuffs :) Some problems here are hard. Try them yourself and yeah~~Solutions (with sources) are given at the end! Problems discussed in the blog post Problem1: Let $ABC$ be a triangle whose incircle $\omega$ touches sides $BC, CA, AB$ at $D,E,F$ respectively. Let $H$ be the orthocenter of $DEF$ and let altitude $DH$ intersect $\omega$ again at $P$ and $EF$ intersect $BC$ at $L$. Let the circumcircle of $BPC$ intersect $\omega$ again at $X$. Prove that points $L,D,H,X$ are concyclic. Problem 2: Let $ ABCD$ be a convex quadrangle, $ P$ the intersection of lines $ AB$ and $ CD$, $ Q$ the intersection of lines $ AD$ and $ BC$ and $ O$ the intersection of diagonals $ AC$ and $ BD$. Show that if $ \angle POQ= 90^\circ$ then $ PO$ is the bisector of $ \angle AOD$ ...

Let's complex bash Part 1

I have to learn complex bash. And almost everyone knows that I am notes taking girl so thought why not make a post on complex bash ( so that I don't get emotionally demotivated lol).😇 There wasn't any need for learning complex bash, but it was in my dream checklist i.e " To learn a bash." And since I am not loaded with exams, I think it's high time to learn Bash and new topics.  Also if anyone from the "anti-bash" community is reading, sorry in advance and R.I.P.  Notes:- 1. Complex numbers are of the form $z=a+ib,$ where $a$ and $b$ are real numbers and $i^2=-1.$ 2. In polar form, $z=r(\cos \theta+~~i\sin\theta)=~~re^{i\theta},$ where $r=~~|z|=~~\sqrt{a^2+b^2},$ which is called the magnitude. 3. Here we used euler's formula i.e $\cos \theta+~~i\sin\theta=~~e^{i\theta}.$ 4. The $\theta $ is called the argument of $z,$ denored $\arg z.$ ( $\theta$ can be considered in $\mod 360$ and it is  measured anti-clockwise). 5. The complex conjugate of $z$ is ...