MethodMath
Ask
Join
HomeTopicsAskAlerts
Profile

© 2026 MethodMath. Built for mathematical knowledge sharing.

AboutContactGuidelinesPrivacyTermsCookies
Alex Kim
Alex Kim
May 9, 2026

Can you solve this integer equation that stumped the AI?

I gave several AIs this problem and they all failed:

Find ALL integer solutions to:

x2+y2=z2+1x^2 + y^2 = z^2 + 1x2+y2=z2+1

The AIs kept saying "Pythagorean triples" and suggesting (3,4,5)(3,4,5)(3,4,5) doesnt work because 9+16=25≠269 + 16 = 25 \neq 269+16=25=26.

But I found some solutions by brute force:

  • (1,1,1)(1, 1, 1)(1,1,1) since 1+1=1+11 + 1 = 1 + 11+1=1+1
  • (2,2,7)(2, 2, \sqrt{7})(2,2,7​) no, x,y,zx, y, zx,y,z must be integers
  • (1,2,2)(1, 2, 2)(1,2,2): 1+4=4+11 + 4 = 4 + 11+4=4+1 YES! (1,2,2)(1, 2, 2)(1,2,2) works

Can someone:

  1. Find ALL integer solutions or characterize them
  2. Explain the number theory behind this equation
  3. Show why AI struggled with this while a human approach works
1 answers881 views

1 Answer

0
Chen Wei
Chen Wei
May 10, 2026
Accepted
The equation is $$x^2+y^2=z^2+1.$$ It has many integer solutions, so the goal is not to prove there are none. A simple family comes from setting $y=1$: $$x^2+1=z^2+1,$$ so $$x^2=z^2.$$ That gives $$x=\pm z.$$ So every triple $$(x,y,z)=(n,1,n)$$ or $$(x,y,z)=(-n,1,n)$$ is a solution. There are also nontrivial examples, like $$3^2+5^2=34$$ and $$\sqrt{33}$$ is not an integer, so not every pair works. The useful lesson is that an AI answer claiming a neat finite list is suspicious unless it proves why all other cases are impossible.
Still unsure? Join to comment or ask a follow-up.
Login or Register to post your answer

Suggested questions

Does 1+2+3+4+... really equal -1/12? Math explained

25.6k

I asked ChatGPT to solve this integral and it gave a wrong answer. Can you check it?

21.1k

How to prove that √2 is irrational by contradiction?

2583

Why does 0 factorial equal 1 instead of 0? Simple proof

31.4k

Does the Banach-Steinhaus theorem hold for non-complete normed spaces?

31.1k