Maths Olympiad Prep

Library / /5 of 9

Number theory Difficulty 7.6 National Olympiad, round 2 Prove it Benelux Mathematical Olympiad

Problem:

a) Find all positive integers gg with the following property: for each odd prime number pp there exists a positive integer nn such that pp divides the two integers
gnn and gn+1(n+1) g^{n}-n \quad \text{ and } \quad g^{n+1}-(n+1)

b) Find all positive integers gg with the following property: for each odd prime number pp there exists a positive integer nn such that pp divides the two integers
gnn2 and gn+1(n+1)2 g^{n}-n^{2} \quad \text{ and } \quad g^{n+1}-(n+1)^{2}

Solution

Solution:

a.
Let gg be a positive integer with the given property. So for each odd prime number pp there exists a positive integer nn such that pgnnp \mid g^{n}-n and pgn+1(n+1)p \mid g^{n+1}-(n+1).
If gg has an odd prime factor pp, then from pgnnp \mid g^{n}-n it follows that pnp \mid n, while from pgn+1(n+1)p \mid g^{n+1}-(n+1) we deduce that pn+1p \mid n+1. But pp cannot divide both nn and n+1n+1; contradiction. So gg is a power of 22: g=2kg=2^{k} for some k0k \geqslant 0.
If g=20=1g=2^{0}=1, then p1np \mid 1-n and p1(n+1)p \mid 1-(n+1), which is again a contradiction.
Suppose k2k \geqslant 2. Then g1g-1 has an odd prime factor pp, therefore g1(modp)g \equiv 1\pmod{p} so 0gnn1n(modp)0 \equiv g^{n}-n \equiv 1-n\pmod{p} and 0gn+1(n+1)1(n+1)(modp)0 \equiv g^{n+1}-(n+1) \equiv 1-(n+1)\pmod{p}, which is again a contradiction.
Now we prove that g=21=2g=2^{1}=2 does satisfy the condition. Let a prime p>2p>2 be given. Choose n=(p1)2n=(p-1)^{2}, then we have n(1)2=1(modp)n \equiv(-1)^{2}=1\pmod{p}. By Fermat's little theorem (using gcd(2,p)=1\gcd(2, p)=1) we know that 2p11(modp)2^{p-1} \equiv 1\pmod{p}, so
2n=2(p1)2=(2p1)p11n(p) 2^{n}=2^{(p-1)^{2}}=\left(2^{p-1}\right)^{p-1} \equiv 1 \equiv n \quad(p)
Multiplying both sides by 22, we see that also
2n+12n=n+nn+1(p) 2^{n+1} \equiv 2 n=n+n \equiv n+1 \quad(p)
We conclude that only g=2g=2 has the given property.

b.
Let gg be a positive integer with the given property. So for each odd prime number pp there exists a positive integer nn such that pgnn2p \mid g^{n}-n^{2} and pgn+1(n+1)2p \mid g^{n+1}-(n+1)^{2}.
If gg has an odd prime factor pp, then from pgnn2p \mid g^{n}-n^{2} it follows that pn2p \mid n^{2}, so also pnp \mid n, while from pgn+1(n+1)2p \mid g^{n+1}-(n+1)^{2} we deduce that p(n+1)2p \mid(n+1)^{2}, so also pn+1p \mid n+1.
But pp cannot divide both nn and n+1n+1; contradiction. So gg is a power of 22: g=2kg=2^{k} for some k0k \geqslant 0.
If g=20=1g=2^{0}=1, then for any odd prime pp we have p1n2=(1n)(1+n)p \mid 1-n^{2}=(1-n)(1+n) and p1(n+1)2=(1(n+1))(1+(n+1))p \mid 1-(n+1)^{2}=(1-(n+1))(1+(n+1)). Now take p=5p=5. The first statement says that n1n \equiv 1 or n14(mod5)n \equiv-1 \equiv 4\pmod{5}, and the second that n0n \equiv 0 or n23n \equiv-2 \equiv 3 (mod5)\pmod{5}. But this yields a contradiction.
If g=21=2g=2^{1}=2, then for any odd prime pp we have p2nn2p \mid 2^{n}-n^{2} and p2n+1(n+1)2p \mid 2^{n+1}-(n+1)^{2}. Now take p=3p=3. As 32n3 \nmid 2^{n} and 32n+13 \nmid 2^{n+1}, we know that 3n23 \nmid n^{2} and 3(n+1)23 \nmid(n+1)^{2}. So these two squares must be 11 modulo 33 (as 22 can never be a square modulo 33). Therefore also 2n2^{n} and 2n+12^{n+1} must be 11 modulo 33, which gives 2122n=2n+11(mod3)2 \cdot 1 \equiv 2 \cdot 2^{n}=2^{n+1} \equiv 1\pmod{3}; contradiction.
Now suppose k2k \geqslant 2. Then g1g-1 has an odd prime factor pp, therefore g1(modp)g \equiv 1\pmod{p} so 0gnn21n2=(1n)(1+n)(modp)0 \equiv g^{n}-n^{2} \equiv 1-n^{2}=(1-n)(1+n)\pmod{p} and 0gn+1(n+1)21(n+1)2=(1(n+1))(1+(n+1))(modp)0 \equiv g^{n+1}-(n+1)^{2} \equiv 1-(n+1)^{2}=(1-(n+1))(1+(n+1))\pmod{p}. Suppose p5p \geqslant 5. The first statement says that n1n \equiv 1 or n1(modp)n \equiv-1\pmod{p}, and the second that n0n \equiv 0 or n2(modp)n \equiv-2\pmod{p}. But nn can only be congruent to at most one of the numbers 2,1,0-2,-1,0 and 11, since p5p \geqslant 5; contradiction. We conclude that p=3p=3, so g1g-1 contains only prime factors 33. Hence 2k1=32^{k}-1=3^{\ell} for some >0\ell>0. We see that 2k1(1)k1(mod3)2^{k}-1 \equiv(-1)^{k}-1\pmod{3}, while 30(mod3)3^{\ell} \equiv 0\pmod{3}. So kk has to be even, say k=2mk=2 m, and our equation becomes 22m1=32^{2 m}-1=3^{\ell}, or equivalently (2m1)(2m+1)=3\left(2^{m}-1\right)\left(2^{m}+1\right)=3^{\ell}. Not both factors on the left-hand side can be divisible by 33, so 2m1=12^{m}-1=1 and 2m+1=32^{m}+1=3^{\ell}, so m=1m=1. Hence g=22=4g=2^{2}=4.
Now we show that g=4g=4 does have the given property. For this we use that g=2g=2 is a solution to part (a): for any odd prime pp there exists a positive integer nn such that
n2n(modp) and n+12n+1(modp). n \equiv 2^{n} \quad\pmod{p} \quad \text{ and } \quad n+1 \equiv 2^{n+1} \quad\pmod{p} .
Taking the square of both congruences, we obtain
n2(2n)2=(22)n=4n(modp) n^{2} \equiv\left(2^{n}\right)^{2}=\left(2^{2}\right)^{n}=4^{n} \quad\pmod{p}
and
(n+1)2(2n+1)2=(22)n+1=4n+1(modp) (n+1)^{2} \equiv\left(2^{n+1}\right)^{2}=\left(2^{2}\right)^{n+1}=4^{n+1} \quad\pmod{p}
as desired.
We conclude that only g=4g=4 has the given property.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.