Latvian National 2025 Grade 12 Problem 4

Prime numbers $p$ and $q$ are such that $p^2 + pq + q^2$ is a square of some positive integer. Prove that $p^2 - pq + q^2$ is a prime number.

_Replace_ `sorry` _in the template below with your solution. Mathlib version used by the checker is v4.28.0_.

import Mathlib.Data.Nat.Prime.Defs

theorem solution (p q : ℕ) (hp : p.Prime) (hq : q.Prime)
    (h : ∃ a, p ^ 2 + p * q + q ^ 2 = a ^ 2) : (p ^ 2 + q ^ 2 - p * q).Prime := sorry

Submit Solution

Login to submit a solution.

Recent Submissions

# User Time (UTC) Status
106 ansar Long time ago PASSED
97 ansar Long time ago PASSED
85 Kitsune Long time ago PASSED
View all