Determine all positive integers $n$ such that $n$ divides $3^n - 2^n$.
Problem
Source: Romanian IMO Team Selection Test TST 1987, problem 7
Tags: algorithm, algebra solved, algebra
10.12.2003 15:04
Let $p$ be the smallest prime divisor of $n$. Then $p\mid 3^n-2^n$ and $p \mid 3^{p-1}-2^{p-1}$, so $p \mid 3^{\gcd (n,p-1)}-2^{\gcd (n,p-1)}$ because $a_n = 3^n-2^n$ is a Mersenne sequence (well-known) $= 3-2 = 1$, so the only $n$ is 1.
10.12.2003 15:05
So, for any a, b, u<sub>n</sub> = a<sup>n</sup> - b<sup>n</sup> is a Mersenne sequence? Strange, I didn't know that, I only knew it is the case for a<sup>n</sup> - 1.
10.12.2003 15:06
n=1 is a solution. If n>1 3 <sup>n</sup>-2 <sup>n</sup> is odd, so n is odd. Let p be the smallest prime divisor of n. We have p|n|3 <sup>n</sup>-2 <sup>n</sup> p|3 <sup>p-1</sup>-2 <sup>p-1</sup> . Because 3 <sup>n</sup>-2 <sup>n</sup> is a Mersene sequence, we get p|3 <sup>gcd(n,p-1)</sup>-2 <sup>gcd(n,p-1)</sup>. Because p was the smallest prime divisor of n, gcd(n,p-1)=1, so p|3-2=1, so p=1. This is a contradiction. So the only solution is n=1.
10.12.2003 15:07
I'm not sure right now, but I think a and b must be coprime.
10.12.2003 15:10
Seems like grobber posted the solution while I was typing mine. a and b need not be coprime. Just distinct.
10.12.2003 15:12
So, for any a, b, gcd(a<sup>n</sup> - b<sup>n</sup>, a<sup>m</sup> - b<sup>m</sup>) = a<sup>d</sup> - b<sup>d</sup> where d = gcd(m, n). Is this only known in Romania or so? I only saw this theorem on this forum. Is it difficult to prove? Also, can you assume it as 'known' at an IMO?
10.12.2003 15:13
Yes, I think you're right, sorry about the mistake (I'm only human! )
10.12.2003 15:18
I appologise for my mistake, but I change my statement to a and b coprime. Suppose n>m. gcd(a^n-b^n,a^m-b^m)=gcd(a^n-b^n-a^n-b^m*a^n-m, a^m-b^m)=gcd(b^m*(b^(n-m)-a^(n-m)),a^m-b^m). Continue using this by following Euclid's algorithm for (n,m) and you should come to gcd(a <sup>m</sup>- b<sup>m</sup>,a <sup>n</sup>- b<sup>n</sup>)=a <sup>gcd(m,n)</sup>- b<sup>gcd(m,n)</sup>.
10.12.2003 15:22
I think it's Ok to use this in contests without proof. From what I've seen, it's pretty well-known (whether it's with a and b coprime or not , because I'm still not sure how it should be).
10.12.2003 15:25
grobber, we keep posting at the same time. If gcd(a,b)=d and a=da1 and b=db1, we get t=gcd(a^n-b^n,a^m-b^m)=d <sup>n</sup> gcd(a1^n-b1^n, d <sup>m-n</sup>*(a1^m-b1^m)), for m>n. We can have p|d and p|a1^n-b1^n and obtain a multiple of a^gcd(n,m)-b^gcd(n,m), larger that a^gcd(n,m)-b^gcd(n,m) (at least p times larger than it). So gcd(a,b)=1 if we want a Mersene sequence. I think Mersene sequences are IMO material.
05.11.2005 00:15
grobber wrote: ... because $a_n = 3^n-2^n$ is a Mersenne sequence (well-known) ... I think you meant: $a_n = 3^n-2^n$ is a Lucas Sequence. Look at P. Ribenboim's "The Little Book of Bigger Primes" (2004) page 44 : $U_n(P,Q)=\frac{\alpha^n-\beta^n}{\alpha-\beta}$ with $\alpha=3$ and $\beta=2$ and thus $P=5$ and $Q=6$. $\'{E}$douard Lucas studied the work of Fibonacci and provided a primality test for Mersenne (and Fermat and other) numbers based on what we now call Lucas Sequences, because he studied them in depth, but he did not discover them. Tony