Is there any faster method to find the smallest a such that $17 \mid (3^a-2^a) $rather than trying to bash it or how to prove that $3^{16}-2^{16}$ is the smallest period since we know by euler phi function $a^{p-1} \equiv 1 \mod p$ for $\gcd(a,p)=1$
-
$3^a\equiv 2^a\pmod{17}\implies \frac{3^a}{2^a}\equiv 1\pmod{17}\implies (3/2)^a\equiv 1\pmod{17}$ – TheBestMagician Oct 29 '22 at 00:39
-
1Concerning the above comment, I want to clarify that those aren't actual fractions there, but the multiplicative inverse of 2, mod 17, if you aren't aware. Seeing fractions in a congruence certainly threw me for a loop for a second – gist076923 Oct 29 '22 at 00:49
-
yeah so we need to find such a such that $(27)^a \equiv 1 \mod 17$ since $2^{-1} \equiv 9 \mod 17$ – Will Oct 29 '22 at 00:51
-
what do we need to do next to reduce $10^a \equiv 1 \mod 17$ do we need to bash a bit? or there is any other method ? – Will Oct 29 '22 at 01:03
-
Provided that we aren't told that $a >0$, wouldn't $a=0$ be the smallest value? – Hersh Oct 29 '22 at 08:10
-
By Euler's theorem you know that $10^{16}\equiv1\pmod{17}$, and the order of $10$ mod $17$ is a divisor of $16=2^4$. It then suffices to check that $10^8\not\equiv1\pmod{17}$, which is not much work because $$10^8\equiv((10^2)^2)^2\equiv((-2)^2)^2\equiv4^2\equiv-1\pmod{17}.$$ – Servaes Nov 01 '22 at 01:36
-
$!\bmod 17!:\ 3^a\equiv 2^a\iff 1\equiv (3/2)^a\equiv (-7)^a,$ by $\frac{3}2\equiv \frac{-14}2\equiv -7.,$ By Fermat $(-7)^{16}\equiv 1$ so by the Order Test the least $a$ with $(-7)^a\equiv 1$ satisifes $a\mid 16,,$ so is a power of $2$, findable by repeated squareing: $,(-7)^2\equiv -2$ $,\Rightarrow (-7)^4\equiv 4$ $\Rightarrow (-7)^8\equiv -1$ $\Rightarrow (-7)^{16}\equiv 1,$ so least $,a = 16.\ \ $ – Bill Dubuque Nov 01 '22 at 14:30
-
Voting to reopen, because this is a special case, where we do not need full order testing. The law of quadratic reciprocity suffices, see my answer. – Jyrki Lahtonen Nov 05 '23 at 12:27
3 Answers
$10^2\equiv-2,\,10^3\equiv 14\,,10^4\equiv 4,\,10^5\equiv 6,\,10^6\equiv 9,\,10^7\equiv 5,\,10^8\equiv 16\equiv-1$, so $10$ is actually primitive $\pmod {17}$.
Actually you could have checked that using a theorem, because $10^8\equiv-1\neq1$.
Thus the answer is $16$.

- 8,427
-
2And of course, to compute $10^8 \pmod{17}$, we can just use $$10^8 \equiv (10^2)^4 \equiv 100^4 \equiv (-2)^4 \equiv 16 \pmod{17}.$$ – VTand Oct 29 '22 at 02:35
A way that requires no calculation of modular powers is the following.
- $17$ is a prime, so there exists an integer $a$ such that $3\equiv2a\pmod{17}$. Think of $a$ as $3/2$ as in the comment of TheBestMagician under the question.
- $6^2=36\equiv2\pmod{17}$, so $2$ is a quadratic residue modulo $17$.
- By the law of quadratic reciprocity $3$ is a quadratic non-residue modulo $17$ because $17$ is $\equiv1\pmod4$ and a quadratic non-residue modulo $3$.
- We can conclude that $a$ is a quadratic non-residue modulo $17$.
- Therefore (by Euler) $a^8\not\equiv1\pmod{17}$.
- Because $17-1=2^4$ all the proper factors of $16$ are factors of $8$. Therefore item 5 implies that $a$ has multiplicative order sixteen.
- So sixteen is the smallest period.
We similarly see that modulo a Fermat prime every quadratic non-residue is a primitive root. A slight extension of the argument shows that if $p$ and $q=2p+1$ form a pair of Sophie Germain primes, then the quadratic non-residues modulo $q$ other than $-1$ are also primitive roots modulo $q$.

- 133,153
-
sorry what is the name $a^8 \ne 1 \mod 17$ theorem since euler had many theorem – Will Oct 29 '22 at 06:19
-
-
-
1
$2\times 9 \equiv 1 \pmod {17}$ so $9$ is the multiplicative inverse of $2$.
If $17|3^a - 2^a$ then $3^a \equiv 2^a \mod{17}$.
Multiply both sides and we get
$3^a\cdot 9^a \equiv 2^a \cdot 9^a \pmod{17}$
$3^{3a}\equiv 1\pmod {17}$.
We can find out the order of $3$ pretty easily. It must divide $16$ so it must be $1,2,4,8$ or $16$. We know $3^{16}\equiv 1$ and if $3^k\equiv 1$ then so is $3^{2k}$ so the best strategy is to start with $3^8$ then $3^4$ until we get a value that isn't equivalent to $1$.
And $3^8 \equiv 81^2\equiv (-4)^2\equiv 16\equiv -1 \pmod {17}$.
So the order of $3$ is $16$. (We probably knew $3$ was a primitive root by other means but it's slipping my mind how)
So $3^{3a}\equiv 1 \pmod {17}$ means $3a$ must be a multiple of $16$ and as $3$ and $16$ are relatively prime the least common multiple of $3$ and $16$ is $3\times 16$ and $a = 16$.
====
Argh. Althernatively... As $3^2 \equiv 2^{-1}$ then $2\equiv 3^{-2}\equiv 3^{14}$.
So we need to find the smallest $a$ where $3^a \equiv 2^a \equiv 3^{14a}$ or the smallest $a$ where $3^{13a}\equiv 1$. So $13a$ is a multiple of the order of $3$ and the smallest $a$ is is the least common multiple of $13$ and the order of $a$. The order of $3$ is a power of $2$ and so is relatively prime to $13$. So the least common multiple of $13$ and the order of $3$ is ... $3$ times the order of $3$.
So $a =$ the order of $3$.
Which is $16$.

- 124,253