 # 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

## Coin Toss Problem | AMC 10A, 2017| Problem No 18

Try this beautiful Problem on Probability from AMC 10A, 2017. Problem-18, You may use sequential hints to solve the problem.

## GCF & Rectangle | AMC 10A, 2016| Problem No 19

Try this beautiful Problem on Geometry on Rectangle from AMC 10A, 2010. Problem-19. You may use sequential hints to solve the problem.

## Fly trapped inside cubical box | AMC 10A, 2010| Problem No 20

Try this beautiful Problem on Geometry on cube from AMC 10A, 2010. Problem-20. You may use sequential hints to solve the problem.

## Measure of angle | AMC 10A, 2019| Problem No 13

Try this beautiful Problem on Geometry from AMC 10A, 2019.Problem-13. You may use sequential hints to solve the problem.

## Sum of Sides of Triangle | PRMO-2018 | Problem No-17

Try this beautiful Problem on Geometry from PRMO -2018.You may use sequential hints to solve the problem.

## Recursion Problem | AMC 10A, 2019| Problem No 15

Try this beautiful Problem on Algebra from AMC 10A, 2019. Problem-15, You may use sequential hints to solve the problem.

## Roots of Polynomial | AMC 10A, 2019| Problem No 24

Try this beautiful Problem on Algebra from AMC 10A, 2019. Problem-24, You may use sequential hints to solve the problem.

## Set of Fractions | AMC 10A, 2015| Problem No 15

Try this beautiful Problem on Algebra from AMC 10A, 2015. Problem-15. You may use sequential hints to solve the problem.

## Indian Olympiad Qualifier in Mathematics – IOQM

Due to COVID 19 Pandemic, the Maths Olympiad stages in India has changed. Here is the announcement published by HBCSE: Important Announcement [Updated:14-Sept-2020]The national Olympiad programme in mathematics culminating in the International Mathematical Olympiad...

## Positive Integers and Quadrilateral | AMC 10A 2015 | Sum 24

Try this beautiful Problem on Rectangle and triangle from AMC 10A, 2015. Problem-24. You may use sequential hints to solve the problem.