Olympiad Maths Prep

Track / Stage 6 / 360 of 400 #1360 of 2000

Problem 1360

National olympiad, first round
Number theory Difficulty 6.8 Prove it

Prove that if nn is a natural number such that 1+2n+4n1 + 2^n + 4^n is prime then n=3kn = 3^k for some kN0k \in N_0.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

To prove that if 1+2n+4n 1 + 2^n + 4^n is prime, then n=3k n = 3^k for some kN0 k \in \mathbb{N}_0 , we will proceed as follows:

1. **Initial Check for Small Values of n n **:
- If n=1 n = 1 , then 1+21+41=1+2+4=7 1 + 2^1 + 4^1 = 1 + 2 + 4 = 7 , which is prime. Thus, n=1=30 n = 1 = 3^0 satisfies the condition.

2. **General Case for n>1 n > 1 **:
- Assume 1+2n+4n=p 1 + 2^n + 4^n = p is a prime number and p>7 p > 7 .
- We can rewrite the expression as 1+2n+(2n)2=p 1 + 2^n + (2^n)^2 = p .

3. Divisibility by 7:
- Consider the expression 23n1 2^{3n} - 1 . We can factorize it as:
23n1=(2n1)(22n+2n+1) 2^{3n} - 1 = (2^n - 1)(2^{2n} + 2^n + 1)
- Notice that 22n+2n+1=1+2n+4n=p 2^{2n} + 2^n + 1 = 1 + 2^n + 4^n = p . Therefore:
23n1=(2n1)p 2^{3n} - 1 = (2^n - 1)p
- Since 23n1 2^{3n} - 1 is divisible by 7 (as 231mod7 2^3 \equiv 1 \mod 7 ), it follows that p p must be divisible by 7 if 2n1 2^n - 1 is not divisible by 7.

4. Divisibility by 3:
- For 23n1 2^{3n} - 1 to be divisible by 7, n n must be divisible by 3. Let n=3k n = 3k for some kN0 k \in \mathbb{N}_0 .

5. Prime Divisors and Order:
- Consider the number 23k+1123k1 \frac{2^{3^{k+1}} - 1}{2^{3^k} - 1} . This is a positive integer greater than 1.
- This fraction must have a prime divisor q q . We need to show that 23k1 2^{3^k} - 1 is not divisible by q q .
- If 23k1modq 2^{3^k} \equiv 1 \mod q , then q q divides 23k+11 2^{3^{k+1}} - 1 but not 23k1 2^{3^k} - 1 .

6. Contradiction and Conclusion:
- If q=3 q = 3 , then 23k1mod3 2^{3^k} \equiv 1 \mod 3 , which is a contradiction since 2≢1mod3 2 \not\equiv 1 \mod 3 .
- Therefore, there exists a prime q q such that q q divides 23k+1123k1 \frac{2^{3^{k+1}} - 1}{2^{3^k} - 1} and gcd(q,23k1)=1 \gcd(q, 2^{3^k} - 1) = 1 .
- This implies q q divides p p , meaning q=p q = p . Hence, p p divides 23k+11 2^{3^{k+1}} - 1 , leading to p<23k+1 p < 2^{3^{k+1}} .

7. Final Contradiction:
- Since n n is odd (otherwise p p would be divisible by 3), and if n n has prime divisors other than 3, then p<23k+1<2n<p p < 2^{3^{k+1}} < 2^n < p , which is a contradiction.

Thus, the only possible values for n n are of the form 3k 3^k .

\blacksquare

The final answer is n=3k \boxed{ n = 3^k } for some kN0 k \in \mathbb{N}_0 .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.