Understand the problem

Let \(p_1,p_2,p_3\) be primes with \(p_2\neq p_3\), such that \(4+p_1p_2\) and \(4+p_1p_3\) are perfect squares. Find all possible values of \(p_1,p_2,p_3\).


Start with hints

Do you really need a hint? Try it first!

Let \(4+p_1p_2=m^2\) and \(4+p_1p_3=n^2\), where \( m,n \in \mathbb{N}\).

\(\Rightarrow p_1p_2=(m-2)(m+2)\) and \(p_1p_3=(n+2)(n-2)\).

Since \(p_1,p_2,p_3\) are primes with \(p_2\neq p_3\) \(\Rightarrow m\neq n\).

Case –I: \(p_2<p_3 \Rightarrow m<n\).

Clearly, \(p_1=m+2=n-2, \Rightarrow n=m+4\)

\(p_2=m-2\) and


Therefore, \((m+2),(m-2),(m+6)\) are all prime numbers.

We see that \(m=5\) satisfy the above condition. And then,\( p_1=7,p_2=3,p_3=11\) .



Case-II: \(p_2>p_3 \Rightarrow m>n\).

\(\Rightarrow p_1=m-2=n+2 \Rightarrow m=n+4\)

\( p_2=m+2=n+6\) and


Now \((n+2),(n+6), (n-2)\) all are primes. Again , \(n=5\) satisfy this condition. Hence \(p_1=7,p_2=11,p_3=3\).


Thus all possible values of \(p_1,p_2,p_3\) are ( 7,3,11) and (7,11,3).

Now need to conclude that there does not exist any more triple of prime numbers satisfying the given condition.

Consider these numbers:

\(p_1=m+2,p_2=m-2,p_3=m+6\) , now the gaps between \(p_1,p_2,p_3\) are given by:

\(p_1-p_2=4, p_3-p_2=8 \) and \(p_3-p_1=4\).

We see that for \(m>9\) these three gaps cannot be 4,8 and 4 simultaneously . That is at least one of these three gaps is greater than 4 for \(m>9\) . And between 1 to 9 only \(m=5\) satisfy the given condition. Hence there does not exist any more triples.


Connected Program at Cheenta

Source of the problem

I.S.I. (Indian Statistical Institute) B.Stat/B.Math Entrance Examination 2017. Subjective Problem no. 6.


Number Theory

Difficulty Level

8.5 out of 10

Suggested Book

Elementary Number Theory by David M. Burton

I.S.I. & C.M.I. Entrance Program

Indian Statistical Institute and Chennai Mathematical Institute offer challenging bachelor’s program for gifted students. These courses are B.Stat and B.Math program in I.S.I., B.Sc. Math in C.M.I.

The entrances to these programs are far more challenging than usual engineering entrances. Cheenta offers an intense, problem-driven program for these two entrances.

Similar Problem

IMO, 2019 Problem 1 – Cauchyish Functional Equation

This problem is a patient and intricate and simple application of Functional Equation with beautiful equations to be played aroun with.

A sequence of natural numbers and a recurrence relation

Understand the problemDefine a sequence by , andfor For every and prove that divides. Suppose divides for some natural numbers and . Prove that divides Indian National Mathematical Olympiad 2010 Number Theory Medium Problem Solving Strategies by Arthur Engel...

Linear recurrences

Linear difference equationsA linear difference equation is a recurrence relation of the form $latex y_{t+n}=a_1y_{t+n-1}+a_2y_{t+n-2}+\cdots +a_ny_t+b$. If $latex b=0$, then it is called homogeneous. In this article, we shall also assume $latex t=0$ for...

2013 AMC 10B – Problem 5 Maximizing the Difference:

This is based on simple ineqaulities on real numbers.

An inductive inequality

Understand the problemGiven and for all , show that Singapore Mathematical Olympiad 2010 Inequalities Easy Inequalities by BJ Venkatachala Start with hintsDo you really need a hint? Try it first!Use induction. Given the inequality for $latex n=k$, the inequality...

A search for perfect squares

Understand the problemDetermine all pairs of positive integers for which is a perfect square.Indian National Mathematical Olympiad 1992 Number Theory Easy An Excursion in Mathematics Start with hintsDo you really need a hint? Try it first!First consider $latex n=0$....

INMO 1996 Problem 1

Understand the problema) Given any positive integer , show that there exist distint positive integers and such that divides for ; b) If for some positive integers and , divides for all positive integers , prove that .Indian National Mathematical Olympiad...

Trigonometric substitution

Understand the problemLet with . Prove thatDetermine when equality holds.Singapore Team Selection Test 2004InequalitiesMediumInequalities by BJ VenkatachalaStart with hintsDo you really need a hint? Try it first!Show that there exists a triangle $latex \Delta ABC$...

The non-existence of a polynomial

Understand the problemIf is a polynomial with integer coefficients and , , , three distinct integers, then show that it is impossible to have , , .Indian National Mathematical Olympiad 1986AlgebraEasyAn Excursion in MathematicsStart with hintsDo you really need a...

A linear functional equation

Understand the problemFind all functions such that for all Singapore Team Selection Test 2008Functional EquationsMediumFunctional Equations by BJ VenkatachalaStart with hintsDo you really need a hint? Try it first!Play with choices of $latex x,y$ belonging to $latex...