HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /The triangular numbers are 1, 3, 6, 10, …, where the nth one is (n(n + 1))/2…
AdvancedMathematicsHigh School (11–12)Number TheoryNumericalOlympiad

The triangular numbers are 1, 3, 6, 10, …, where the nth one is (n(n + 1))/2…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

The triangular numbers are 1,3,6,10,…1, 3, 6, 10, \dots1,3,6,10,…, where the nnnth one is n(n+1)2\dfrac{n(n + 1)}{2}2n(n+1)​. Some are also perfect squares, such as 111 and 363636. Show that n(n+1)2=m2\dfrac{n(n + 1)}{2} = m^22n(n+1)​=m2 becomes the Pell equation X2−8Y2=1X^2 - 8Y^2 = 1X2−8Y2=1 with X=2n+1X = 2n + 1X=2n+1 and Y=mY = mY=m. Then use the solutions of that equation to find the third square triangular number and its nnn.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Factor into a product equal to a known number; order the unknowns and bound the smallest; compare remainders modulo a well-chosen number. Pell's equation x2−dy2=1x^2 - dy^2 = 1x2−dy2=1 has the solutions

xk+ykd=(x1+y1d)k.\displaystyle x_k + y_k\sqrt d = (x_1 + y_1\sqrt d)^k.xk​+yk​d​=(x1​+y1​d​)k.

The worked solution

Check an answer or open a hint to unlock the worked solution.

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Turn it into Pell. n(n+1)2=m2\tfrac{n(n + 1)}{2} = m^22n(n+1)​=m2 gives 4n2+4n=8m24n^2 + 4n = 8m^24n2+4n=8m2, so (2n+1)2−8m2=1(2n + 1)^2 - 8m^2 = 1(2n+1)2−8m2=1. With X=2n+1X = 2n + 1X=2n+1 and Y=mY = mY=m this is X2−8Y2=1X^2 - 8Y^2 = 1X2−8Y2=1.

Step 2. Solutions. The fundamental solution is (3,1)(3, 1)(3,1). The step rule X′=3X+8YX' = 3X + 8YX′=3X+8Y, Y′=X+3YY' = X + 3YY′=X+3Y gives (17,6)(17, 6)(17,6) and then (99,35)(99, 35)(99,35).

Step 3. Back to nnn and mmm. (3,1)(3, 1)(3,1) gives n=1n = 1n=1, m=1m = 1m=1. (17,6)(17, 6)(17,6) gives n=8n = 8n=8, m=6m = 6m=6: the number 363636. (99,35)(99, 35)(99,35) gives n=49n = 49n=49, m=35m = 35m=35: the number 352=122535^2 = 1225352=1225.

Check. 49×502=1225=352\tfrac{49 \times 50}{2} = 1225 = 35^2249×50​=1225=352.

Answer: the third square triangular number is 122512251225, with n=49n = 49n=49.

Watch out. Every solution of the Pell equation has XXX odd, so n=X−12n = \tfrac{X - 1}{2}n=2X−1​ is always a whole number. Here no solution is lost.

Log in to save this for later
← All Problems
← Prove that the equation x³ + y³ + z³ = n has no solution in integers when n leaves remainder 4 or 5…Next →
More onNumber Theory

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. Prove that the equation x³ + y³ + z³ = n has no solution in integers when n leaves remainder 4 or 5…Advanced
  2. Find every triple of positive integers a ≤ b ≤ c with 1/a + 1/b + 1/c = 1, and prove that there are…Advanced
  3. Find all pairs of positive integers (x, y) with x² - y² = 945…Hard
  4. A teacher wants a list of every primitive Pythagorean triple whose hypotenuse is less than 100…Advanced
  5. Prove that the product abc of the three sides of every Pythagorean triple is a multiple of 60…Advanced
All problems on this topic →