Prove that if $p$ and $q$ are two prime numbers, such that $$p+p^2+p^3+...+p^q=q+q^2+q^3+...+q^p,$$then $p=q$.
Problem
Source: Moldova TST 2021
Tags: number theory, prime numbers
19.09.2021 18:03
Moldova TST 2021 wrote: Prove that if $p$ and $q$ are two prime numbers, such that \[ p + p^2 + \dots + p^q = q + q^2 + \dots + q^p, \]then $p = q$. Cute problem. Suppose $p \not= q$. WLOG $q < p$. Rewrite this as \[ \frac{p^{q + 1} - p}{p - 1} = \frac{q^{p + 1} - q}{q - 1} \implies p(q - 1)(p^{q} - 1) = q(p - 1)(q^p - 1) \]Since $p \not= q$, then $\gcd(p,q) = 1$. By Fermat Little Theorem, this implies \[ q(p - 1)(q^p - 1) \equiv 0 \pmod{p} \implies q^p - 1 \equiv 0 \pmod{p} \implies q - 1 \equiv 0 \pmod{p}. \]This either gives us $q = 1$, which is not possible or $p \le q - 1$. However, $q < p$, which gives us a contradiction.
19.09.2021 18:20
GorgonMathDota wrote: Moldova TST 2021 wrote: Prove that if $p$ and $q$ are two prime numbers, such that \[ p + p^2 + \dots + p^q = q + q^2 + \dots + q^p, \]then $p = q$. Cute problem. Suppose $p \not= q$. WLOG $q < p$. Rewrite this as \[ \frac{p^{q + 1} - p}{p - 1} = \frac{q^{p + 1} - q}{q - 1} \implies p(q - 1)(p^{q} - 1) = q(p - 1)(q^p - 1) \]Since $p \not= q$, then $\gcd(p,q) = 1$. By Fermat Little Theorem, this implies \[ q(p - 1)(q^p - 1) \equiv 0 \pmod{p} \implies q^p - 1 \equiv 0 \pmod{p} \implies q - 1 \equiv 0 \pmod{p}. \]This either gives us $q = 1$, which is not possible or $p \le q - 1$. However, $q < p$, which gives us a contradiction. how did you get this part? \[ q(p - 1)(q^p - 1) \equiv 0 \pmod{p} \implies q^p - 1 \equiv 0 \pmod{p} \implies q - 1 \equiv 0 \pmod{p}. \]Like how is this FLT? And if $q^p-1 \equiv 0\pmod{p},$ why does it give $q-1 \equiv 0\pmod{p}?$
19.09.2021 18:23
math12345678 wrote: GorgonMathDota wrote: Moldova TST 2021 wrote: Prove that if $p$ and $q$ are two prime numbers, such that \[ p + p^2 + \dots + p^q = q + q^2 + \dots + q^p, \]then $p = q$. Cute problem. Suppose $p \not= q$. WLOG $q < p$. Rewrite this as \[ \frac{p^{q + 1} - p}{p - 1} = \frac{q^{p + 1} - q}{q - 1} \implies p(q - 1)(p^{q} - 1) = q(p - 1)(q^p - 1) \]Since $p \not= q$, then $\gcd(p,q) = 1$. By Fermat Little Theorem, this implies \[ q(p - 1)(q^p - 1) \equiv 0 \pmod{p} \implies q^p - 1 \equiv 0 \pmod{p} \implies q - 1 \equiv 0 \pmod{p}. \]This either gives us $q = 1$, which is not possible or $p \le q - 1$. However, $q < p$, which gives us a contradiction. how did you get this part? \[ q(p - 1)(q^p - 1) \equiv 0 \pmod{p} \implies q^p - 1 \equiv 0 \pmod{p} \implies q - 1 \equiv 0 \pmod{p}. \]Like how is this FLT? And if $q^p-1 \equiv 0\pmod{p},$ why does it give $q-1 \equiv 0\pmod{p}?$ Doesn't FLT say that $a^p \equiv a \pmod{p}$. So, \[ q \equiv q^p \equiv 1 \pmod{p} \]
19.09.2021 18:29
how did you get the $1?$
19.09.2021 19:19
augustin_p wrote: Prove that if $p$ and $q$ are two prime numbers, such that $p+p^2+p^3+...+p^q=q+q^2+q^3+...+q^p$, then $p=q$. This is so trivial for a TST !! Note that we can condensed this from GP, to get $$\frac{q(q^{p} -1) }{q-1} = \frac{p(p^{q} -1) }{p-1} $$, now this implies that $ord_{q} p = 1 $ and $ord_{p} q = 1 $ , which is an obvious size issue..
19.09.2021 20:37
I agree it's too easy. We have $p\cdot (q-1)\cdot (p^q-1)=q\cdot (p-1)\cdot (q^p-1)$. Assume $p>q$,since $p\mid RHS$ we have $q^p-1\equiv q-1\equiv 0 \ (mod \ p)$ we get $q<p \leq q-1$ which is contradiction. So $p=q$. Done!
30.10.2021 21:40