 # Understand the problem

Let $p,q$ be prime numbers $.$ Prove that if $p+q^2$ is a perfect square $,$ then $p^2+q^n$ is not a perfect square for any positive integer $n.$
##### Source of the problem
Italy MO 2019, Problem 2
Number Theory
5/10
##### Suggested Book
Challenges and Thrills of Pre College Mathematics

Do you really need a hint? Try it first!

Let us first write the condition and use the idea that p and q are prime. Let $a \in \mathbb{N}$ such that $$p + q^2 = a^2$$ => $$p = a^2 - q^2 = (a - q)(a + q)$$. As $p$ is a prime and $a + q > a - q$, then $a - q = 1$. We must have $p = 2q + 1$. Now, try to use this condition to rewrite the expression we are interested in.
p = 2q+1. Suppose that there exists $b \in \mathbb{N}$ such that for some positive integer $n$, then $$p^2 + q^n = b^2$$ => $$q^n = b^2 - p^2$$ => $$q^n = (b - p)(b + p)$$. It implies that both (b-p) and (b+p) must be powers of q. Hence gcd(b-p, b+p) = (b-p). b-p | b+p => b-p | 2p = 4q + 2. As, b-p is a power of q, it implies that b-p = 1 and q can be a prime or q = 2 and b-p = 2 as gcd (b-p, 4q+2) = 1 if q is an odd prime or 2 if q = 2. Thus, we get that ( b-p = 1 ) or ( b-p =2, q = 2 ) and p = 2q+1.
Case 1 ( b-p = 1 ): b -p = 1, (b – p) = 1, (b+p) = $$q^n = 1 + 2p = 3 + 4q$$. Now, you see that LHS will grow much more fast as q increases than the RHS. Mathematically, $$q^n \geq q^2 \geq 4q+3$$ as $$q \geq 5, n \geq 2$$. So, the only possibility for q is q = 2, 3, 5. But it has no solution as you can see.
Case 2 ( q = 2 ): It implies p = 2q+1 = 5. $$2^n = (b-5)(b+5)$$. It implies that the both b-5 and b+5 must be powers of 2. Let $$b-5 = 2^a \leq b+5 = 2^b \rightarrow 2^b – 2^a = 10 \rightarrow a = 1 and 2^(b-1) – 1 = 5$$. This has no solution.

QED.

# Connected Program at Cheenta

Math Olympiad is the greatest and most challenging academic contest for school students. Brilliant school students from over 100 countries participate in it every year. Cheenta works with small groups of gifted students through an intense training program. It is a deeply personalized journey toward intellectual prowess and technical sophistication.

# Similar Problems

## Geometry of AM GM Inequality

AM GM Inequality has a geometric interpretation. Watch the video discussion on it and try some hint problems to sharpen your skills.

## Geometry of Cauchy Schwarz Inequality

Cauchy Schwarz Inequality is a powerful tool in Algebra. However it also has a geometric meaning. We provide video and problem sequence to explore that.

## RMO 2019 Maharashtra and Goa Problem 2 Geometry

Understand the problemGiven a circle $latex \Gamma$, let $latex P$ be a point in its interior, and let $latex l$ be a line passing through $latex P$. Construct with proof using a ruler and compass, all circles which pass through $latex P$, are tangent to \$latex...

## RMO 2019 (Maharashtra Goa) Adding GCDs

Can you add GCDs? This problem from RMO 2019 (Maharashtra region) has a beautiful solution. We also give some bonus questions for you to try.

## Number Theory, Ireland MO 2018, Problem 9

This problem in number theory is an elegant applications of the ideas of quadratic and cubic residues of a number. Try with our sequential hints.

## Number Theory, France IMO TST 2012, Problem 3

This problem is an advanced number theory problem using the ideas of lifting the exponents. Try with our sequential hints.

## Algebra, Austria MO 2016, Problem 4

This algebra problem is an elegant application of culminating the ideas of polynomials to give a simple proof of an inequality. Try with our sequential hints.

## Number Theory, Cyprus IMO TST 2018, Problem 1

This problem is a beautiful and simple application of the ideas of inequality and bounds in number theory. Try with our sequential hints.

## Number Theory, South Africa 2019, Problem 6

This problem in number theory is an elegant applciations of the modulo technique used in the diophantine equations. Try with our sequential hints

## Number Theory, Korea Junior MO 2015, Problem 7

This problem in number theory is an elegant application of the ideas of the proof of infinitude of primes from Korea. Try with our sequential hints.