Lifting the Exponent (LTE) is a powerful tool in number theory. Before we get started, let's make sure we know a bit of notation:
Definition: νp(x) denotes the largest nonnegative integer k such that pk∣x, where x is a nonzero integer. In other words, pk∣x but pk+1∤x. Sometimes we also denote this by pk∣∣x, or say pk mostly divides x.
Now, we can get started!
The idea is that νp(a2−b2)=νp((a−b)(a+b))=νp(a−b)+νp(a+b).
Now, I'll introduce LTE:
LTE for odd primes (first form): Let p>2 be a prime and let a,b be integers with p∣ab and p∣a−b. Then
νp(an−bn)=νp(a−b)+νp(n).
We care about this result because it lets us reduce powers very quickly!
Proof. We induct on νp(n).
Base case: νp(n)=0.
Then p∣n, and we have
vp(an−bn)=νp(a−b)+νp(an−1+an−2b+⋯+bn−1),
and we want to show this equals νp(a−b).
Indeed, since p∣a−b, we have a≡b mod p, and so
an−1+an−2b+⋯+bn−1≡nan−1(modp).
Since neither n nor a is divisible by p, this last quantity is not divisible by p, so we are done with the base case.
However, we need a second base case (you'll see why later).
Base case 2: νp(n)=1.
Write a=m+b. The trick is to re-write an−bn. We have
νp(an−bn)=νp((m+b)n−bn)=νp((i=0∑nmibn−i(in))−bn)=νp(i=1∑nmibn−i(in))
by the Binomial Theorem.
Now note p∣a−b⟹p∣m, so for all i>2, we know that the largest power of p dividing mibn−i(in) has an exponent of νp(m)+2. Let's call this z.
Now, consider when i=1,2: We get the terms
mbn−1n+m2bn−22n(n−1).
Since p∣n but p2∣n, we have that pz divides the second term, and pz−1 divides the first term, and pz does not divide the first term.
Thus, putting everything together,
νp(an−bn)=νp(pz−1⋅blah+pz⋅moreblah), where
p∣blah, so the valuation is νp(an−bn)=z−1=νp(m)+1 as desired.
Inductive step: Proving the result for νp(n)=k+1 given νp(n)=k.
This is an easy example of induction:
Write n=px. Then by our inductive hypothesis,
νp(an−bn) =νp(apx−bpx)=νp((ap)x−(bp)x)=νp(ap−bp)+νp(x),
since νp(x)=k.
Now νp(ap−bp)=νp(a−b)+1, so the end result is k+1 as desired.
Clearly, if we change b to −b in the first form of the theorem, we are done. There is just one small point here: n should be odd so that we can factorize an+bn. The rest of the proof is just the same.
Now, what happens if p=2?
LTE for p=2: If x,y are odd integers and n is even, then
ν2(xn−yn)=ν2(x2−y2)+ν2(n)−1.
The proof is very similar, with induction again. I'll leave it as an exercise to the reader.
Now, let's see LTE at work!
First, a short trick:
First, there's an annoying case when n is even: Since p∣x+1, then x≡−1modp and thus xn≡1modp. It follows that xn+1≡2modp, and thus νp(xn+1)=0.
Now, if n is odd, νp(xn+1)=νp(xn−(−1)n)=νp(x+1)+νp(n) by LTE!
LTE for odd primes (second form). Let p>2 be a prime and let a,b be integers with p∣ab and p∣a+b. Also, suppose that n is a positive integer. Then
νp(an+bn)=νp(a+b)+νp(n).
We want to use LTE to evaluate ν2(3n−1n). However, if you go back to the statement of LTE, we require n to be even.
Luckily, this is an easy fix- if n is odd and n≥1 then 3n≡1 mod 4, so we obtain an easy contradiction.
Now, if n is even then ν2(3n−1n)=2+ν2(n).
Meanwhile, 2n∣3n−1 shows ν2(3n−1)≥n.
Thus 2+ν2(n)≥n, and n is even, so easy bounding tells us n=2,4.
Once again, our solutions are n=1,2,4.
This problem is trickier than the previous one, so I'll just give the solution. However, it has lots of interesting ideas which the reader should be able to understand and the inequality isn't too strong...:
Take any p∣b, so that p>2 since b is odd. Then vp(an−1)≥n.
Now notice an−1∣(an)p−1−1=(ap−1)n−(1p−1)n.
Thus, since p∣ap−1−1 by Fermat, we have
νp((ap−1)n−1)=νp(ap−1−1)+νp(n)≥νp(an−1)≥n.
But this clearly implies
ab>ap−1−1≥pνp(ap−1−1)≥npn≥n3n, which gives us the desired inequality.
Now, I'll leave the reader with one more exercise to do, another inequality:
(More Romanian TST) Let m≥2 be an integer. A positive integer n has the property that for any positive integer a coprime with n, we have am−1≡0(modn).
Prove that n≤4m(2m−1).
By Fermat, a≡ap≡1modp, so νp(a−1)=νp(ap−1)−1≥n−1.
If 1+k is not a power of 2, choose an odd prime p∣1+k and take n=pm. Then, for each j not divisible by p, we have νp(jn+(k+1−j)n)=νp(k+1)+νp(n)≥m+1. Also, if p∣j (and, thereby, p∣k+1−j), then n∣pm∣pn∣jn so the sum in question is divisible by pm=n.
If 1+k is a power of 2, then take an odd prime divisor p of k and repeat the above argument with k−1 instead of k (the last term kn is, obviously, not a problem).
k must be odd since the sum of 2 squares is divisible by 3 only if both squares are divisible by 3. If p∣x+y, then p is odd and νp(3n)=νp(xk+yk)=νp(k)+νp(x+y), which means that p=3, so x+y=3m and n=ν3(k)+m. Now it is just cases.
a) m>1. Then ν3(k)≤k−2 for all k>1, and M=max(x,y)≥5 so
xk+yk≥Mk>213m5k−1>3m5k−2≥3m+k−2≥3m+ν3(k)=3n,
which gives an immediate contradiction.
b) m=1. Then x=1,y=2 (or vice versa) and we get 31+ν3(k)=1+2k, meaning k≤2(1+ν3(k)) whence ν3(k)=1, so n=2 giving the only solution 32=13+23.
n must be 1 or prime (otherwise any nontrivial divisor d of n will divide both (n−1)! and nm. Now, n=2,m=1 is a solution, n=1 is not, so it suffices to consider the case when n is an odd prime.
If m is odd, then ν2(nm−1)=ν2(n−1)<ν2((n−1)!) if n>3. n=3 is not a solution, so we can consider only even m.
Then ν2((n−1)!)=ν2(m)−1+ν2(n+1)+ν2(n−1) or ν2((n−2)!)=ν2(n+1)+ν2(m)−1. But the left hand side is at least 2n−3 (just count evens up to n−2), so m≥2(n−1)/2/(n+1), which is at least n for n≥18. It remains to note that nn>(n−1)!+1 for n>1.
Now comes the remaining finite trial and error part:
4!+1=52 is good
6!+1=721 is bad
n=11 gives ν2(m)=9 which is far too large.
n=13 gives ν2(m)=10, which is too large too
n=17 gives some big ν2(m) as well.