Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have an enriching summer experience. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following upcoming events:
[list][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Orthocenter
jayme   7
N a few seconds ago by Ianis
Dear Mathlinkers,

1. ABC an acuatangle triangle
2. H the orthcenter of ABC
3. DEF the orthic triangle of ABC
4. A* the midpoint of AH
5. X the point of intersection of AH and EF.

Prove : X is the orthocenter of A*BC.

Sincerely
Jean-Louis
7 replies
jayme
Mar 25, 2015
Ianis
a few seconds ago
Inspired by old results
sqing   0
18 minutes ago
Source: Own
Let $ a,b>0 $ and $ \frac{a}{b^2}+\frac{2\sqrt{3}}{2a^2+b^2}\leq 3\sqrt 3. $ Prove that$$a^2+2b^2\geq 1$$
0 replies
1 viewing
sqing
18 minutes ago
0 replies
something...
SunnyEvan   1
N 20 minutes ago by SunnyEvan
Source: unknown
Try to prove : $$ \sum csc^{20} \frac{2^{i} \pi}{7} csc^{23} \frac{2^{j}\pi }{7} csc^{2023} \frac{2^{k} \pi}{7} $$is a rational number.
Where $ (i,j,k)=(1,2,3) $ and other permutations.
1 reply
SunnyEvan
2 hours ago
SunnyEvan
20 minutes ago
2-var inequality
sqing   3
N 32 minutes ago by sqing
Source: Own
Let $ a,b\geq 0    $. Prove that
$$ \frac{a }{a^2+2b^2+1}+ \frac{b }{b^2+2a^2+1}\leq \frac{1}{\sqrt{3}} $$$$   \frac{a }{2a^2+ b^2+2ab+1}+ \frac{b }{2b^2+ a^2+2ab+1}  \leq \frac{1}{\sqrt{5}} $$$$ \frac{a }{2a^2+ b^2+ ab+1}+ \frac{b }{2b^2+ a^2+ ab+1} \leq \frac{1}{2} $$$$\frac{a }{a^2+2b^2+2ab+1}+ \frac{b }{b^2+2a^2+2ab+1}\leq \frac{1}{2} $$
3 replies
1 viewing
sqing
2 hours ago
sqing
32 minutes ago
HK bisect QS
lssl   24
N an hour ago by LeYohan
Source: 1998 HK
In a concyclic quadrilateral $PQRS$,$\angle PSR=\frac{\pi}{2}$ , $H,K$ are perpendicular foot from $Q$ to sides $PR,RS$ , prove that $HK$ bisect segment$SQ$.
24 replies
lssl
Jan 5, 2012
LeYohan
an hour ago
Points in general position
AshAuktober   3
N 2 hours ago by blackbluecar
Source: 2025 Nepal ptst p1 of 4
Shining tells Prajit a positive integer $n \ge 2025$. Prajit then tries to place n points such that no four points are concyclic and no $3$ points are collinear in Euclidean plane, such that Shining cannot find a group of three points such that their circumcircle contains none of the other remaining points. Is he always able to do so?

(Prajit Adhikari, Nepal and Shining Sun, USA)
3 replies
AshAuktober
Mar 15, 2025
blackbluecar
2 hours ago
Interesting inequalities
sqing   2
N 2 hours ago by sqing
Source: Own
Let $ a,b,c>0 $ and $ a+b\leq 16abc. $ Prove that
$$ a+b+kc\geq\sqrt{k}$$$$ a+b+kc^2\geq\frac{3\sqrt[3]{k}}{4}$$Where $ k>0. $
$$ a+b+c\geq1$$$$ a+b+4c\geq2$$$$ a+b+c^2\geq\frac{3}{4}$$$$ a+b+8c^2\geq\frac{3}{2}$$
2 replies
sqing
Yesterday at 12:23 PM
sqing
2 hours ago
IMO 2014 Problem 1
Amir Hossein   132
N 2 hours ago by maromex
Let $a_0 < a_1 < a_2 < \dots$ be an infinite sequence of positive integers. Prove that there exists a unique integer $n\geq 1$ such that
\[a_n < \frac{a_0+a_1+a_2+\cdots+a_n}{n} \leq a_{n+1}.\]
Proposed by Gerhard Wöginger, Austria.
132 replies
Amir Hossein
Jul 8, 2014
maromex
2 hours ago
IMO Genre Predictions
ohiorizzler1434   31
N 2 hours ago by ohiorizzler1434
Everybody, with IMO upcoming, what are you predictions for the problem genres?


Personally I predict: predict
31 replies
ohiorizzler1434
Saturday at 6:51 AM
ohiorizzler1434
2 hours ago
weird FE
tobiSALT   10
N 2 hours ago by NicoN9
Source: Pan American Girls' Mathematical Olympiad 2024, P5
Find all functions $f: \mathbb{R} \to \mathbb{R}$ such that
$f(f(x+y) - f(x)) + f(x)f(y) = f(x^2) - f(x+y),$

for all real numbers $x, y$.
10 replies
tobiSALT
Nov 27, 2024
NicoN9
2 hours ago
2015 solutions for quotient function!
raxu   49
N 2 hours ago by blueprimes
Source: TSTST 2015 Problem 5
Let $\varphi(n)$ denote the number of positive integers less than $n$ that are relatively prime to $n$. Prove that there exists a positive integer $m$ for which the equation $\varphi(n)=m$ has at least $2015$ solutions in $n$.

Proposed by Iurie Boreico
49 replies
raxu
Jun 26, 2015
blueprimes
2 hours ago
Cosine of polynomial is polynomial of cosine
yofro   1
N 3 hours ago by yofro
Source: 2025 HMIC #2
Find all polynomials $P$ with real coefficients for which there exists a polynomial $Q$ with real coefficients such that for all real $t$, $$\cos(P(t))=Q(\cos t).$$
1 reply
yofro
3 hours ago
yofro
3 hours ago
Problem 1
randomusername   72
N 3 hours ago by blueprimes
Source: IMO 2015, Problem 1
We say that a finite set $\mathcal{S}$ of points in the plane is balanced if, for any two different points $A$ and $B$ in $\mathcal{S}$, there is a point $C$ in $\mathcal{S}$ such that $AC=BC$. We say that $\mathcal{S}$ is centre-free if for any three different points $A$, $B$ and $C$ in $\mathcal{S}$, there is no points $P$ in $\mathcal{S}$ such that $PA=PB=PC$.

(a) Show that for all integers $n\ge 3$, there exists a balanced set consisting of $n$ points.

(b) Determine all integers $n\ge 3$ for which there exists a balanced centre-free set consisting of $n$ points.

Proposed by Netherlands
72 replies
randomusername
Jul 10, 2015
blueprimes
3 hours ago
Permutation with no two prefix sums dividing each other
Assassino9931   2
N 4 hours ago by Assassino9931
Source: Bulgaria Team Contest, March 2025, oVlad
Does there exist an infinite sequence of positive integers $a_1, a_2 \ldots$, such that every positive integer appears exactly once as a member of the sequence and $a_1 + a_2 + \cdots + a_i$ divides $a_1 + a_2 + \cdots + a_j$ if and only if $i=j$?
2 replies
Assassino9931
4 hours ago
Assassino9931
4 hours ago
Primes and sets
mathisreaI   39
N Apr 28, 2025 by awesomehuman
Source: IMO 2022 Problem 3
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around the circle such that the product of any two neighbors is of the form $x^2+x+k$ for some positive integer $x$.
39 replies
mathisreaI
Jul 13, 2022
awesomehuman
Apr 28, 2025
Primes and sets
G H J
G H BBookmark kLocked kLocked NReply
Source: IMO 2022 Problem 3
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathisreaI
9 posts
#1 • 4 Y
Y by S.Ragnork1729, Honestcobra, cubres, farhad.fritl
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around the circle such that the product of any two neighbors is of the form $x^2+x+k$ for some positive integer $x$.
This post has been edited 1 time. Last edited by v_Enhance, Jul 16, 2022, 12:38 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
lminsl
544 posts
#2 • 10 Y
Y by AnonymousBunny, AndreiVila, MassiveMonster, lkjin7932, hitlers3x45333563, Rounak_iitr, hdnlz, bhan2025, cubres, farhad.fritl
We solve this strengthened version of the problem:
Quote:
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one
way (up to rotation and reflection) to place the elements of $S$ around a circle such that the product of any two
neighbours is of the form $x^2 + x + k$ for some integer $x$.

We induct on $|S|$. For $|S| \le 3$ there is at most one way to place the primes regardless, so the statement follows.

Now suppose the statement holds for all sets $S$ with, say, $|S|<n$. The main idea is the following:

Claim. Let $p$ be the largest prime in $S$. Then there is exactly one way to determine the neighbors of $p$. Furthermore, if $p$ is adjacent to $q$ and $r$, then the product $qr$ is also of the form $x^2+x+k$.

It is clear that this claim kills the problem; say if there are two different possible configurations, then we can remove $p$ from the circle and use the induction hypothesis on $S \setminus \{p\}$. Hence it suffices to prove the claim.

Write $pq = a^2+a+k$ and $pr = b^2+b+k$ for some nonnegative integers $a$ and $b$. Then since
\[ p^2 > pq = a^2+a+k > a^2 \]we have $0 \le a < p$ and similarly we get $0 \le b < p$. Then $a$ and $b$ are two different solutions to the equation $x^2+x+k \equiv 0 \pmod p$ within $[0, p-1]$, so $a$ and $b$ are uniquely determined by Lagrange's theorem.

Furthermore, since $a+b \equiv -1 \pmod p$ by Vieta's formula and $1<a+b < 2p-1$, we must have $a+b=p-1$.
Therefore, for $x = 2a+1, y=2b+1, s= 4k-1$ we have
\begin{align*}
   p^2qr = (a^2+a+k)(b^2+b+k) &= \frac{1}{16} (x^2+s)(y^2+s) \\
                                                      &= \frac{1}{16} \left[ (xy-s)^2+ s(x+y)^2 \right] \\
                                                      &= \frac{1}{16} \left[ (xy-s)^2+ 4s(a+b+1)^2 \right] \\
                                                      &= \frac{1}{16} \left[ (xy-s)^2+ 4sp^2 \right] \\
                                                      &= \frac{1}{4} \left[((xy-s)/p)^2+ s \right]p^2,
\end{align*}so for the integer $u$ satisfying $(xy-s)/p=2u+1$ we have $qr = u^2+u+k$. We’re done.
This post has been edited 2 times. Last edited by lminsl, Jul 17, 2022, 5:06 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hyay
181 posts
#3 • 7 Y
Y by adj0109, Kingsbane2139, Jalil_Huseynov, somebodyyouusedtoknow, Nartku, cubres, farhad.fritl
Allow $x$ in $x^2 + x + k$ to be zero. We start by proving the following lemma.

Lemma. If $p, q, r$ are odd primes and there exist $x, y \in \mathbb{Z}_{\geq 0}$ satisfying
\[p = x + y + 1, \quad pq = x^2 + x + k, \quad pr = y^2 + y + k\]then there exists $z \in \mathbb{Z}_{\geq 0}$ satisfying
\[qr = z^2 + z + k.\]
Proof. Rewrite as
\begin{align*}
4pq &= (2x + 1)^2 + (4k - 1) = (2x + 1 + \sqrt{1 - 4k})(2x + 1 - \sqrt{1 - 4k}) \\
4pr &= (2y + 1)^2 + (4k - 1) = (2y + 1 + \sqrt{1 - 4k})(2y + 1 - \sqrt{1 - 4k}) \\
\end{align*}then
\[16p^2qr = (4xy + 2x + 2y + 2 - 4k + (2x + 2y + 2)\sqrt{1 - 4k})(4xy + 2x + 2y + 2 - 4k - (2x + 2y + 2)\sqrt{1 - 4k})\]so
\[4qr = \left( \frac{2xy + p - 2k}{p} + \sqrt{1-4k} \right) \left( \frac{2xy + p - 2k}{p} - \sqrt{1-4k} \right) \]meanwhile
\[2xy + p - 2k = 2x(p - x - 1) + p - 2k = p(2x + 1) - 2(x^2 + x + k) = p(2x - 2q + 1)\]thus
\[4qr = \left( 2x - 2q + 1 + \sqrt{1-4k} \right) \left( 2x - 2q + 1 - \sqrt{1-4k} \right)\]and so take $z = \frac{|2x - 2q + 1| - 1}{2}$. $\blacksquare$

We will now solve the problem by induction on the number of elements of $S$. For $|S| = 2$, there is nothing to prove. Assume that for $|S| = k \ge 2$ the statement is true. Consider $|S| = k+1$ and take the largest prime $p \in S$. Let $q, r < p$ be its neighbors.

Let $x, y \in \mathbb{Z}_{\geq 0}$ such that
\[pq = x^2 + x + k, \quad pr = y^2 + y + k\]then
\[p | x^2 + x - y^2 - y = (x - y)(x + y + 1)\]If $p | x - y$, then one of $x, y$ is at least $p$, but $x^2 + x + k$ and $y^2 + y + k$ are at most $p^2$, contradiction.
So, $p | x + y + 1$, and if $x + y + 1 \geq 2p$ then similarly we arrive at the same contradiction. Thus, $p = x + y + 1$. Hence, if we remove $p$ from the circle and let $q$ be adjacent to $r$, the resulting circle with $k$ primes will also satisfy the condition, due to our lemma.

There is at most one such arrangement, and considering $p | (2x + 1)^2 + (4k - 1)$, $x, y < p$, we know there is exactly one possible value of the pair $(x, y)$ up to permutation. So, the $k+1$ primes must also have at most one possible arrangement.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IndoMathXdZ
691 posts
#4 • 3 Y
Y by Rounak_iitr, pavel kozlov, cubres
2022 IMO/3 wrote:
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around a circle such that the product of any two neighbours is of the form $x^2 + x + k$ for some positive integer $x$.
We'll prove this by induction on $|S|$ on the relaxed problem: we'll prove the statement such that product of any two neighbors is of the form $x^2 + x + k$ for some integer $x$, which proves the original problem. The result is clearly true for $|S| \le 3$. Now, assume that the result is true for any $|S| < n$, where $n \ge 4$. We'll prove that this is true for $|S| = n$. Indeed, suppose that there exists a configuration for $S$ with $|S| = n$, otherwise we are done. Call a number $m$ of the form $m = x^2 + x + k$ for some $x \in \mathbb{Z}$ as nice. Now, take the largest prime $P$ on this set $S$. By assumption, there exists distinct primes $Q, R < P$ such that
\[ PQ = x^2 + x + k \ \text{and} \ PR = y^2 + y + k \]Claim 01. $QR$ is nice.
Proof. By maximality of $P$, we have $x, y < P$ and furthermore \[ P \mid x^2 - y^2 + x - y = (x - y)(x + y + 1) \implies x \equiv y \pmod{P} \ \text{or} \ x + y + 1 \equiv 0 \pmod{P} \]As $x \not= y$, we conclude that $x + y = P - 1$. Now, we have
\[ 2(k - xy) \equiv (x + y)^2 - 2xy + (x + y) + 2k \equiv (x^2 + x + k) + (y^2 + y + k) \equiv 0 \pmod{P} \]and since $P$ is odd, then $xy \equiv k \pmod{P}$. Write $xy = k + Pz$ for some $z \in \mathbb{Z}$.
Therefore, we have
\begin{align*}
QR &= \frac{(PQ)(PR)}{P^2} \\
&= \frac{(x^2 + x + k)(y^2 + y + k)}{P^2} = \frac{(x^2 + x + xy - Pz)(y^2 + y + xy - Pz)}{P^2} = \frac{(Px - Pz)(Py - Pz)}{P^2} \\
&= (x - z)(y - z) = xy - z(x + y) + z^2 = k + Pz - z(x + y) + z^2 = k + z + z^2 
\end{align*}We thus conclude that $QR$ has to be nice as well.
The above claim implies that we can construct a valid configuration with $|S| = n - 1$ assuming that a valid configuration with $|S| = n$ exists; and by inductive hypothesis, there exists a unique valid configuration for $|S| = n - 1$, by deleting the largest prime. Therefore, the valid configuration for $|S| = n$ can only be obtained by inserting $P$ between any two consecutive primes in the configuration for $|S| = n - 1$. Now, suppose there are more than one ways to insert the prime, then there exists distinct $a,b,c \in S$ and $x,y,z \in \mathbb{N}$ such that
\begin{align*}
aP &= x^2 + x + k \\
bP &= y^2 + y + k \\
cP &= z^2 + z + k
\end{align*}However, as $a,b,c < P$, we have $x,y,z < P$ as well. Furthermore, as $a,b,c$ are distinct, then $x,y,z$ are distinct as well. Therefore, $P \mid x + y + 1, y  + z + 1 \implies x + y = P - 1 = y + z \implies x = z$, a contradiction. Therefore, the configuration for $|S| = n$ has to be unique as well, and hence our original result holds.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
323 posts
#5 • 1 Y
Y by cubres
So before I actually write my solution, WTF was the point of making $x$ a positive integer instead of a non-negative integer? Do the leaders think it's cool to punish contestants that figure out the mathematical content of the problem, but don't notice some silly calculation quirk? Is it even cooler when someone tries to fix it by making them integers, but then applies a size argument that is technically wrong? Do they find it absolutely hilarious to hand out $6$s instead of $7$s? It seems so pointless to have a troll like that in what is otherwise probably the best or second-best problem this IMO.

We prove the more general version of the problem where $x$ is allowed to be a non-negative integer (*sighs*). We proceed by induction on $|S|$ where the cases with $|S| \le 3$ are immediate. Assume that $S$ admits at least one circular list as described in the problem, let $p = \max S$ and let $q$ and $r$ be its neighbors. Thus there exist non-negative integers $x$ and $y$ such that

\begin{align*}
pq &= x^2 + x + k \\
pr &= y^2 + y + k
\end{align*}
Since $p = \max S$ we have $pq < p^2$ and therefore we must have $x < p$. Similarly $y < p$. Subtracting, we obtain $p(q - r) = x^2 + x - y^2 - y = (x - y)(x + y + 1)$, and as $p$ is prime it must either divide $x - y$ or $x + y + 1$. The former gives $|x - y| \ge p$ since $q \neq r$ implies $x\neq y$, but this is impossible for $0 \le x, y < p$. Therefore $p$ dividess $x + y + 1$, and since $0 < x + y + 1 \le 2(p - 1) + 1 < 2p$ it follows that $x + y + 1 = p$. Remembering that $p(q - r) = (x - y)(x + y + 1)$ we obtain

\[x - y = q - r, \qquad x + y = p - 1\]
And therefore

\[\boxed{x = \frac{p + q - r - 1}{2} \qquad y = \frac{p - q + r - 1}{2}}\]
Now if some $s \in S$ with $s \neq q, r$ satisfied $ps = z^2 + z + k$ we would similarly be able to conclude $x = \frac{p + q - s - 1}{2}$ but this is a clear contradiction to $r \neq s$. Therefore no other $s \in S$ satisfies this condition, and thus $q$ and $r$ must be the neighbors of $p$ in any suitable list formed by the elements of $S$. We now substitute $x$ back into $pq = x^2 + x + k$ and after some calculations we obtain

\[k = \frac{2(pq + qr + rp) - (p^2 + q^2 + r^2) + 1}{2}\]
Our goal is now to show that $qr$ is also of the form $z^2 + z + k$ for some non-negative $z$. Indeed, we can verify that $z = \frac{-p + q + r - 1}{2}$ satisfies $z^2 + z + k = qr$. (This is to be expected as it is just relabeling $(p, q, r) \to (q, r, p)$ in $x^2 + x + k = qr$, and $k$ is symmetric in $p$, $q$ and $r$). This is suitable as long as $q + r \ge p + 1$, otherwise if $q + r \le p - 1$ we may choose $z = \frac{p - q - r - 1}{2}$, which provides the same value of $z^2 + z$. The remaining case $q + r = p$ is not possible since $p, q, r$ are all odd. (This is the only thing we need their oddness for!).

Finally the previous observation implies that if we delete $p$ from any circular list, the resulting list still satisfies the conditions of the problem. By induction there is a at most one way to create a valid circular list from $S \setminus \{p\}$, and since $p$ is forced to be between $q$ and $r$ there is also at most one way to create a valid list from $S$.

Remark. In my opinion, exploring the case $|S| = 3$ is extremely informative -- you can prove that it is always possible to choose a suitable $k$, and that it in fact only depends on the expressions for $pq$ and $pr$, after which the solution flows very naturally.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Tintarn
9042 posts
#6 • 5 Y
Y by WallyWalrus, LinearAlgebra, IAmTheHazard, pavel kozlov, Assassino9931
Perhaps the shortest way to prove the required identity for $qr$ is the following:
As before, if $p>q,r$ and $pq=x^2+x+k$ and $pr=y^2+y+k$, then $x+y=p-1$ and $x-y=q-r$.
Hence we can write $x=q+d, y=r+d$ so that $p=q+r+2d+1$ and plugging in, we get
\[q(q+r+2d+1)=(q+d)^2+q+d+k\]which immediately simplifies to $qr=d^2+d+k$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Tintarn
9042 posts
#7
Y by
juckter wrote:
So before I actually write my solution, WTF was the point of making $x$ a positive integer instead of a non-negative integer? Do the leaders think it's cool to punish contestants that figure out the mathematical content of the problem, but don't notice some silly calculation quirk? Is it even cooler when someone tries to fix it by making them integers, but then applies a size argument that is technically wrong? Do they find it absolutely hilarious to hand out $6$s instead of $7$s? It seems so pointless to have a troll like that in what is otherwise probably the best or second-best problem this IMO.
From what I have heard, the jury (as well as the PSC) did not realize this issue until it was too late to change the problem statement anymore.
So the problem was stated like this, but it was decided that no point will be deducted for missing out on the positivity.
Still, it is an unfortunate situation...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
323 posts
#8 • 2 Y
Y by Mango247, Mango247
Tintarn wrote:
juckter wrote:
So before I actually write my solution, WTF was the point of making $x$ a positive integer instead of a non-negative integer? Do the leaders think it's cool to punish contestants that figure out the mathematical content of the problem, but don't notice some silly calculation quirk? Is it even cooler when someone tries to fix it by making them integers, but then applies a size argument that is technically wrong? Do they find it absolutely hilarious to hand out $6$s instead of $7$s? It seems so pointless to have a troll like that in what is otherwise probably the best or second-best problem this IMO.
From what I have heard, the jury (as well as the PSC) did not realize this issue until it was too late to change the problem statement anymore.
So the problem was stated like this, but it was decided that no point will be deducted for missing out on the positivity.
Still, it is an unfortunate situation...
Yeah, I have just learned that the proposer was also unaware of this, so in the end it was just an unintended result of losing three coin flips in a row... Still, other than that little detail the problem is very good! Definitely better to have it like this than to not have it at all.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
JG666
287 posts
#9 • 3 Y
Y by David-Vieta, HamstPan38825, straight
Here is a nice solution found by Chen Chen (陈晨), tutor at Xueersi School in China.

Solution. We induct on $|S|=n$, with base case $(n=2)$ being clear. Now suppose the statement holds for all $|S|\leqslant n$ and we check $n+1$:

Set $S=\{p_1<p_2<\cdots<p_{n+1}\}$. First we will show that the two numbers which $p_{n+1}$ is connected to are uniquely determined.

Let $p_ip_j = x^2+x+k = (2x+1)^2+(4k-1)$. Set $4k-1=t$ for convenience. Also, let
$$\begin{cases}
4p_ip_{n+1} = a^2+t\quad (1) \\ 
4p_jp_{n+1} = b^2+t\quad (2) \\
\end{cases}$$where $a,b\in\mathbb {N_+}$. Notice that $a,b$ are both odd, $a,b<2p_{n+1}$, $p_i, p_j < p_{n+1}$. By subtracting $(2)-(1)$ we get:
$$4(p_j-p_i)p_{n+1} = (b+a)(b-a)$$which implies $b+a = 2p_{n+1}$ and $b-a = 2(p_j-p_i)$.

Since $a,b$ are uniquely determined by $t$, we must have $p_i$ and $p_j$ uniquely determined as well.

To finish, note
\begin{align*}
4p_ip_j &= \frac{(a^2+t)(b^2+t)}{4p_{n+1}^2} \\ 
&= \frac{\left[(ab-t)^2+t(a+b)^2\right]}{4_{n+1}^2} \\
& = \left(\frac{ab-t}{2p_{n+1}}\right)^2+t
\end{align*}Then cut out $p_{n+1}$ and induct down. Done.

Remarks by JG666: Induction is a intuitive idea. I think the most amazing part is that he used $p_ip_j = x^2+x+k = (2x+1)^2+(4k-1)$, which I didn't come up with. After we had this then the left process is quite natural.
This post has been edited 1 time. Last edited by JG666, Jul 13, 2022, 6:09 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rama1728
800 posts
#10 • 2 Y
Y by rightways, The_Great_Learner
Extraordinary problem. First time I am seeing such a good NT in IMO P3/6.

There are two parts in this problem. The first part is to prove that we can actually induct, which means, the flow of the inductive step is guaranteed. The second part is to actually complete the induction.
Part 1. Guaranteeing Induction.

Let \(P\) be the largest prime in \(S\). I claim that \(P\)'s neighbors \(q\) and \(r\) satisfy the following: \[qr=x^2+x+k\]for some \(x\). Note that if we prove this, we are done because we can delete \(P\) and work on the inductive step.

Assume that \[qP=a^2+a+k\]and \[rP=b^2+b+k\]Subtracting gives: \[P\mid (a-b)(a+b+1)\]Assume that \(p\mid a-b\). Then, we have \(a\) or \(b\) to be greater than \(P\), assume that \(a>P\). Then, \[P^2>qP=a^2+a+k>P^2\]a contradiction. Therefore, \(P\mid a+b+1\). Now, let \[a+b+1=Px\]Then, \begin{align*}
2P^2 &> 2P(q+r) \\
&= (a^2+a+k)+(b^2+b+k) \\
& = (a+b)^2+(a+b)+k-2ab \\
&= (Px-1)^2+(Px-1)+k-2ab \\
&> (Px-1)^2+(Px-1)-\frac{(Px-1)^2}{2}+2k
&= \frac{(Px)^2}{2}+2k-\frac{1}{2} \\
\end{align*}This evidently implies \(x=1\), because if \(x>1\), the inequality fails. Therefore \(a+b+1=P\). Now, that means \[(a+b+1)q=a^2+a+k\]and \[(a+b+1)r=b^2+b+k\]so \[a+b+1\mid a^2+a+k\]which then gives \(a+b+1\mid ab-k\). Let \[d=\frac{ab-k}{a+b+1}\]then we have \(q=a-d\) and \(r=b-d\). So, \[qr=(d-a)(d-b)=d^2-(a+b)d+ab=d^2-(P-1)d+Pd+k=d^2+d+k\]and we are done.
Part 2. Completing the inductive step.

Now, we can induct. Assume that the statement holds for \(\lvert S\rvert=n\). Then, if we add a bigger prime \(P\) to the set, it will be placed between two primes \(q\) and \(r\). Moreover, since the number of solutions to \[x^2+x+k\equiv0\pmod{P}\]is precisely \(2\), \(P\)'s neighbors \(q\) and \(r\) are uniquely determined, completing the inductive step and thus solving the problem. $\blacksquare$
In my opinion, this problem is a pinnacle of number theory. I hope more such problems come up in the future!
This post has been edited 1 time. Last edited by rama1728, Jul 13, 2022, 6:30 AM
Reason: .
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
VicKmath7
1389 posts
#11
Y by
Probably this is not the cleanest solution, but I also used the same idea of inducting by removing the largest prime, and the difference is that I am using the existence of $x$ in Case 1 with discriminants. Even though, this is remarkably straightforward for P3, I just tried induction and it worked. Here it goes:

Before we begin, we consider some basic facts about an equation $x^2+x+k=pq$. In order to have an positive integer root, we need $D=1-4(k-pq)=4pq+1-4k=4pq-m$ to be a perfect square (let $4k-1=m$); note that this is also a sufficient condition.

We prove the statement by induction on the number of elements in $S$, the base cases are trivial. Assume it is true for $k-1$, we will prove it for $k$. Consider primes $p_1, p_2,...,p_k$ and let WLOG $p_k$ be the largest prime among them. Suppose there are two working arrangements for these primes. Let's remove $p_k$, and now we obtain either two identical working arrangements for $p_1,...,p_{k-1}$, or at least one arrangement which does not work for $p_1,...,p_{k-1}$ (two distinct working arrangements are forbidden due to IH).

Case 1. We have one non-working arrangement, but it becomes working after adding $p_k$. Hence there is exactly one pair $(p_i,p_j)$ (let WLOG $p_i>p_j$) in that arrangement that doesn't have a product of the desired type, but $(p_i,p_k)$ and $(p_j,p_k)$ do have such a product. Hence we have $4p_ip_k-m=a^2, 4p_jp_k-m=b^2$ and $a>b$. Apparently $a,b<2p_k$ since $p_k>p_i,p_j$. We have that $4p_k(p_i-p_j)=(a-b)(a+b)$. We have that $a-b<2p_k$, so if $p_k$ divides it, then $a-b=p_k$ is odd and $a+b=4(p_i-p_j)$ is even, absurd. Hence $p_k$ divides $a+b<4p_k$, and similarly $a+b$ can't be odd, so $a+b=2p_k, a-b=2(p_i-p_j)$, hence $a=p_k+p_i-p_j,b=p_k+p_j-p_i$, so plugging back in the equations, we obtain $m=2p_ip_k+2p_jp_k+2p_ip_j-p_i^2-p_j^2-p_k^2$. Now, note that $4p_ip_j-m=(p_i+p_j-p_k)^2$, hence $p_ip_j=x^2+x+k$ has a positive integer root, contradiction.

Case 2. We obtain two identical working arrangements after removing $p_k$. We will prove that for a given working arrangement, we can add $p_k$ in exactly one place, which will finish. So let's assume $p_k$ can be added between $(p_i,p_j)$, and $(p_r, p_s)$, WLOG $p_i>p_j, p_r>p_s$. As in the first case, we obtain $m=2p_ip_k+2p_jp_k+2p_ip_j-p_i^2-p_j^2-p_k^2=2p_rp_k+2p_sp_k+2p_rp_s-p_r^2-p_s^2-p_k^2$, so $2p_k(p_i+p_j)-(p_i-p_j)^2=2p_k(p_r+p_s)-(p_r-p_s)^2$, which can be rewritten as $2p_k(p_i+p_j-p_r-p_s)=(p_i-p_j-p_r+p_s)(p_i-p_j+p_r-p_s)$. Using that $p_k$ is the biggest prime, we obtain that if WLOG $p_i-p_j>p_r-p_s$, then both expressions on the RHS are smaller than $2p_k$ but both are even, so $p_k$ can't divide neither of them. Now suppose that some of those two terms are zero. Then we have $p_j=p_r$ or $p_j=p_s$, so we obtain a quadruple of primes $(p, q, r, s)$, such that putting $p>q, r, s$ between $(q, r)$ and $(r, s)$ again gives working configuration, so any pair of those 4 primes has product of the type $x^2+x+k$. Let $pq=x^2+x+k, pr=y^2+y+k, ps=z^2+z+k$. Obviously $x, y, z<p$, so since $p|(x-y)(x+y+1)$ we have $p|x+y+1<2p$, hence $p=x+y+1=y+z+1=z+x+1$, so $x=y=z$, absurd.
This post has been edited 7 times. Last edited by VicKmath7, Jul 14, 2022, 11:37 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Pmshw
17 posts
#12 • 1 Y
Y by alinazarboland
Here's a sketch of the solution
Lemma.Let $p_{i-1} \le p_{i+1}$ where $p_{i-1},p_{i},p_{i+1}$ are three consecutive primes on the circle. Then we have : $p_{i-1}+p_{i} \leq p_{i+1}$ for all elements of $S$ except 1 of them.
Proof . Let $f(x_i)=p_i.p_{i+1}$ . then we have either $x_i=x_{i+1} (mod p)$ or their sum is -1 mod p. In first case , by taking the difference $f(x_{i+1})-f(x_i) \geq f(x_i +p)-f(x_i) \geq p_i^2$ we'll get the desired inequality. In the second case , let $x_i=pl+r$ where $r$ is between 0,p-1 . by adding up the relations for $x_i , x_i+1 $we'll get the fact $l$ cannot be 1 by taking mod 2. and $l  \geq 2$ . Let $x_{i+1}=tp+p-r-1$ . if $t\geq l+1$ , we're done by the same inequalities as before and there is at most one index $i$ st $t=l$ and we have $t \geq l$ and we're done.
Now , assume wlog $p_3>p_2+p_1$ . So $p_3>p_2$ and by the lemma $p_4>p_3+p_2$ and so on...and clearly there is only one place we can stop in this proggress and we're done.
This post has been edited 2 times. Last edited by Pmshw, Jul 13, 2022, 7:27 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Justanaccount
196 posts
#13 • 3 Y
Y by JG666, Mango247, Mango247
My sketchy solution:
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ltf0501
191 posts
#14 • 1 Y
Y by rama1728
Tintarn wrote:
juckter wrote:
So before I actually write my solution, WTF was the point of making $x$ a positive integer instead of a non-negative integer? Do the leaders think it's cool to punish contestants that figure out the mathematical content of the problem, but don't notice some silly calculation quirk? Is it even cooler when someone tries to fix it by making them integers, but then applies a size argument that is technically wrong? Do they find it absolutely hilarious to hand out $6$s instead of $7$s? It seems so pointless to have a troll like that in what is otherwise probably the best or second-best problem this IMO.
From what I have heard, the jury (as well as the PSC) did not realize this issue until it was too late to change the problem statement anymore.
So the problem was stated like this, but it was decided that no point will be deducted for missing out on the positivity.
Still, it is an unfortunate situation...

That's right. My colleague and I discovered this issue when we were translating this problem. But it was too late to modify the English version, so the problem remained the same constraint positive integer $x$. At least it was found before the exam, or it might be embarrassed if we didn't discover this problem and found by the contestants. Also, it might be a serious issue when coordinating :)
This post has been edited 2 times. Last edited by ltf0501, Jul 13, 2022, 9:18 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rama1728
800 posts
#15
Y by
ltf0501 wrote:
Tintarn wrote:
juckter wrote:
So before I actually write my solution, WTF was the point of making $x$ a positive integer instead of a non-negative integer? Do the leaders think it's cool to punish contestants that figure out the mathematical content of the problem, but don't notice some silly calculation quirk? Is it even cooler when someone tries to fix it by making them integers, but then applies a size argument that is technically wrong? Do they find it absolutely hilarious to hand out $6$s instead of $7$s? It seems so pointless to have a troll like that in what is otherwise probably the best or second-best problem this IMO.
From what I have heard, the jury (as well as the PSC) did not realize this issue until it was too late to change the problem statement anymore.
So the problem was stated like this, but it was decided that no point will be deducted for missing out on the positivity.
Still, it is an unfortunate situation...

That's right. My colleague and I discovered this problem when we were translating this problem. But it was too late to modify the English version, so the problem remained the same constraint positive integer $x$. At least it was found before the exam, or it might be embarrassed if we didn't discover this problem and found by the contestants. Also, it might be a serious issue when coordinating :)

WOW YOU MADE THIS PROBLEM!!! IMO 2020 P6 AND IMO 2022 P3 WOW MAN! KEEP GOING!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ltf0501
191 posts
#16 • 4 Y
Y by Mango247, Mango247, Mango247, EpicBird08
rama1728 wrote:

WOW YOU MADE THIS PROBLEM!!! IMO 2020 P6 AND IMO 2022 P3 WOW MAN! KEEP GOING!

Oh sorry, I mislead you lol. This problem is not proposed by me. The issue I found is that the official solution and the whole jury did not notice the constraint positive integers $x$ leads to some strange issues. We just tried to reflect on this issue at the jury meeting.
This post has been edited 2 times. Last edited by ltf0501, Jul 13, 2022, 9:20 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rama1728
800 posts
#17
Y by
ltf0501 wrote:
rama1728 wrote:

WOW YOU MADE THIS PROBLEM!!! IMO 2020 P6 AND IMO 2022 P3 WOW MAN! KEEP GOING!

Oh sorry, I mislead you lol. This problem is not proposed by me. The issue I found is that the official solution and the whole jury did not notice the constraint positive integers $x$ leads to some strange issues. We just tried to reflect on this issue at the jury meeting.

Ohh.. I see, thanks!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math90
1476 posts
#18
Y by
We solve this strengthened version of the problem:
Quote:
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one
way (up to rotation and reflection) to place the elements of $S$ around a circle such that the product of any two
neighbours is of the form $x^2 + x + k$ for some integer $x$.

We induct on $|S|$. For $|S| \le 3$ there is at most one way to place the primes regardless, so the statement follows.

Now suppose $n>3$ and the statement holds for all sets $S$ with $|S|=n-1$. For an odd prime $p$, we say that an odd prime $q$ is $p$-good if $q<p$ and there exists an integer $x$ such that $pq=x^2+x+k$.
Claim 1. Let $p$ be an odd prime. Let $q,r$ be distinct $p$-good primes. Then
$$p^2+q^2+r^2-2pq-2pr-2qr=1-4k.$$
Proof. WLOG assume $q>r$. Then there exist integers $x,y$ such that $pq=x^2+x+k$ and $pr=y^2+y+k$. If $x<0$ we can replace $x$ by $-1-x$, and similarly for $y$. Hence we can assume $x,y\ge 0$. Since $q>r$ then $x>y$. We see that
$$p(q-r)=x^2+x-y^2-y=(x-y)(x+y+1).$$Since $k$ is a positive integer,
$$p^2>pq=x^2+x+k>x^2.$$Hence $x<p$. Therefore $y<x<p$, so $x-y<p$. Since $p\mid (x-y)(x+y+1)$ we must have $p\mid x+y+1$. Now
$$0<x+y+1\le (p-1)+(p-1)+1=2p-1<2p$$so $x+y+1=p$. Hence $x-y=q-r$ so $2x+1=p+q-r$. Now
\begin{align*}
1-4k &=(2x+1)^2-4pq\\
&=(p+q-r)^2-4pq\\
&=p^2+q^2+r^2-2pq-2pr-2qr.\;\square
\end{align*}
Claim 2. Let $p$ be an odd prime. Then:
  1. There exist at most two $p$-good primes, and
  2. if $q>r$ are two $p$-good primes then $r$ is $q$-good.

Proof. Let us prove part by part.
  1. Assume by contradiction that there exists $p$-good primes $q,r,s$ such that $p>q>r>s$. By claim 1 we obtain
    $$p^2+q^2+r^2-2pq-2pr-2qr=p^2+q^2+s^2-2pq-2ps-2qs.$$$$\implies r^2-2pr-2qr=s^2-2ps-2qs.$$$$\implies (r-s)(r+s-2p-2q)=0.$$But $r>s$ and $r+s<2p+2q$, contradiction.
  2. Assume $q>r$ are two $p$-good primes. By claim 1 we obtain
    $$1-4k=p^2+q^2+r^2-2pq-2pr-2qr=(q+r-p)^2-4qr.$$Since $p,q,r$ are odd then $x=\frac{q+r-p-1}{2}$ is an integer. Moreover
    $$x^2+x+k=\frac{(2x+1)^2-1+4k}{4}=\frac{(q+r-p)^2-1+4k}{4}=qr$$so $r$ is $q$-good. $\square$

Back to the main problem. Let $p=\max(S)$. By claim 2, $p$ has the same pair of neighbors in all legal arrangements, and removing $p$ preserves the conditions of the problem. Hence we are done by induction hypothesis.
This post has been edited 4 times. Last edited by math90, Jul 13, 2022, 2:15 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
adamov1
355 posts
#19 • 1 Y
Y by Mango247
Call a pair of odd primes $(p, q)$ good if $pq$ can be written as $x^2+x+k$ for some $x$. We first prove the following lemmas

Lemma 1. If $p>q>r$ are odd primes with $(p, q)$ good and $(p, r)$ good, then $(q, r)$ is good.
Proof

Lemma 2. If $p>q>r>s$ are odd primes, we cannot have all pairs among them good.
Proof

Now proceed by induction on $|S|$. The base case $|S|=4$ follows from Lemma 2. Now suppose we have two circular arrangements of $S$. Let $p$ be the largest element of $S$, then note that, by Lemmas 1 and 2 combined, $p$ must have the same neighbors $q,r$ in both arrangements.

By Lemma 1, $(q, r)$ is good. Thus if we remove $p$ from both circular arrangements and connect $q$ and $r$, we get valid circular arrangements for $S\backslash\{p\}$. By the inductive hypothesis, these must be the same, so the original arrangements were the same, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DVDthe1st
341 posts
#21 • 2 Y
Y by IAmTheHazard, pavel kozlov
There are two key steps to solving the problem: looking at the largest prime $p$ and noticing that if $pq, pr$ can be expressed as $x^2+x+k$, then so can $qr$. Here I'll give some motivation for the latter.

Suppose $pq = x^2 + x + k, pr = y^2 + y + k$. If we let $\alpha$ denote the complex number such that $\alpha^2 + \alpha + k = 0$, then note that the other root $\bar \alpha$ is the complex conjugate, satisfying $\alpha + \bar\alpha = -1, \alpha \bar\alpha = k$. Then we have
$$ x^2 + x + k = (x-\alpha)(x-\bar\alpha) =: N(x-\alpha)$$where for us $N(z) := z\bar z$. A key fact is that the function $N$ is multiplicative and in general $N(a-b\alpha) = a^2 + ab+ kb^2$, so we expect that
$$(x^2 + x + k)(y^2 + y + k) = N((x-\alpha)(y-\alpha)) = N(xy - (x+y) \alpha+ \alpha^2) = N(xy - k - (x+y+1)\alpha) = (xy-k)^2 + (xy-k)(x+y+1) + k(x+y+1)^2$$and conveniently for us we have $x+y+1 = p$ and $p \mid xy-k$, so by setting $A= (xy-k)/p$ we do indeed get $qr = A^2 + A + k$.

Extra motivation, for those who know a bit of algebraic number theory
This post has been edited 1 time. Last edited by DVDthe1st, Jul 13, 2022, 8:00 PM
Reason: -
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5604 posts
#22 • 1 Y
Y by I.owais
We solve the problem
Stronger IMO 2022 Problem 3 wrote:
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around the circle such that the product of any two neighbours is of the form $x^2+x+k$ for some integer $x$.
This will solve the original problem.

Call a positive integer $n$ good if it can be written as $x^2 + x + k$, where $x$ is an integer.

Call an arrangement of the elements of $S$ in a circle to be valid if the product of any two neighbors is of the form $x^2+x+k$, where $x$ is an integer. We wish to show that $S$ has at most one valid arrangement up to rotation and reflection.

Lemma: Let $q$ and $r$ be distinct primes in $S$, and $p$ be the largest prime in $S$. If $pq$ and $pr$ are good, then $qr$ is good.
Proof: Let \[pq = x^2 + x + k, pr = y^2 + y + k \]
Since \[x^2 + x + k = (-x-1)^2 + (-x-1) + k \]and \[y^2 + y + k = (-y-1)^2 + (-y-1) + k,\]since at least one of $\{-x-1,x\}$ is nonnegative, there exist integers $x,y\ge0$ with \[pq = x^2 + x + k, pr = y^2 + y + k\]
We have \[p(q-r) = pq - pr = (x-y)(x+y+1)\]
If $p\mid x-y$, then $x=y$ because $0\le x,y<p$. This is a contradiction as $q$ and $r$ are distinct.

So $p\mid x+y+1$.

Since $x,y<p$, we have \[x+y+1\le 2(p-1) + 1 = 2p-1\]The only positive multiple $p$ less than $2p-1$ is $p$, so $p=x+y+1$.

So $x-y = q-r$ and $x+y = p-1$. This implies $2x = p+q-r-1$.

We have \begin{align*}
(x-q)^2 + (x-q) + k \\ 
 = x^2 - 2xq + q^2 + x-q + k  \\
= x^2 + x + k - 2xq + q^2 - q \\
= x^2 + x + k - (p+q-r-1)q + q^2 - q \\
= (x^2 + x + k) - pq -q^2 +qr + q + q^2 - q \\
=(pq - pq ) + qr \\
= qr, \\
\end{align*}so $qr$ is good. $\square$

Now we induct on $|S|$. If $|S|\in \{1,2,3\}$, there is exactly one way to place the elements of $S$ around a circle up to rotation and reflection, so the result holds.

Suppose the result is true for all sets with cardinality $n-1$.

For a set $S$ with $|S| = n$, we have a set $S_1\subseteq S$, such that $|S_1| = n-1$, and $S_1$ contains all elements of $S$ except the largest prime in $S$.

If there is at most one valid arrangement of the elements of $S$, then we are done. Suppose FTSOC $S$ had at least two valid arrangements.

By the inductive hypothesis, there is at most one valid arrangement of the elements of $S_1$.

By the lemma, for each valid arrangement of $S$, deleting the largest prime in $S$ gives the unique valid arrangement of the elements of $S_1$. Since we are assuming $S$ has a valid arrangement, $S_1$ must also have a valid arrangement.

Therefore each valid arrangement of $S$ is made by inserting the largest prime factor in $S$, say $p$, between two primes in the unique valid arrangement of $S_1$.

Claim: There is at most one way to insert $p$ between two primes in the valid arrangement of $S_1$.
Proof: Suppose there was at least two ways. Then there exist distinct primes $a,b,c<p$, such that \[ap = x^2 + x + k, bp = y^2 + y + k, cp = z^2 + z + k,\]where $x,y,z$ are nonnegative integers (since $x^2 + x + k = (-x-1)^2 + (-x-1) + k$, and so on).

Since \[ap < p^2 < p^2 + p + k,\]\[bp < p^2 < p^2 + p + k, \]and \[cp < p^2 < p^2 + p + k,\]we have $0\le x,y,z<p$.

So \[p(a-b) = ap - bp = (x-y)(x+y+1)\]If $p\mid x-y$, then $x=y$ because $0\le x,y<p$. This is a contradiction as $a$ and $b$ are distinct.

Thus, $p\mid x+y+1$. Since \[0< x+y+1\le 2(p-1) + 1 =2p-1,\]we have $p=x+y+1$.

Similarly, $p=x+z+1$.

This implies $y=z$, so $b=c$, contradiction. $\square$

Inserting $p$ between two primes in $S_1$ uniquely determines the arrangement of $S$. Thus, there is at most $1$ valid arrangement of $S$.
This post has been edited 1 time. Last edited by megarnie, Jul 27, 2022, 11:51 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
PUjnk
71 posts
#23
Y by
Here's my solution :

We first prove the following lemma:
\textbf{Lemma}: If p,q,r are distinct primes with $p>q$ and $p>r$. Now suppose$k \in \mathbb{N}$ such that $\exists m,n \in \mathbb{N}_0$ satisfying $m^2+m+k=pq$ and $n^2+n+k=pr$, then $\exists y \in \mathbb{N}_0$ such that $y^2+y+k=qr$ or $m=q$ and $n=r$.

\begin{proof}: $m^2+m+k=pq \Longrightarrow (2m+1)^2+(4k-1)=4pq$ - (1).
Similarly, we have that $(2n+1)^2+(4k-1)=4pr$.
Now let $d=4k-1,a=2m+1,b=2n+1$.
So we can rewrite (1),(2) as :
$a^2+d=4pq$ - (1) and $b^2+d=4pr$ - (2).
Now consider $K=\mathbb{Q}(\sqrt{-d})$.
We shall denote the norm of an element $\alpha$ in $K$ as $N(\alpha)$.
Then we see that :
$N(a+\sqrt{-d})=4pq$- (3) and $N(b+\sqrt{-d})=4pr$ - (4).
Now from (1) and (2), we have that $p \mid a^2-b^2=(a-b)(a+b) \Longrightarrow p \mid a+b$ or $p \mid a-b$ (since p is a prime).
Now suppose $p \mid a-b$.
Note that since $q<p,r<p$, we have that $a^2<a^2+d=4pq<4p^2 \Longrightarrow a < 2p$.
Similarly, we have that $b<2p$.
But now we have that $p \mid a-b$.
Moreover since $d \equiv 3$ (mod 4), we have that $a^2 \equiv 1$ (mod 4) and so a is odd. Similarly, we also have that $b$ is odd.
Thus $2 \mid a-b$.
It is clear that $p \neq 2$ and hence $2p \mid a-b$ (as $g(p,2)=1$ since p is a prime $\neq 2$).
But now since $0 \le a,b < 2p$, we have that $|a-b|<2p$.
Thus we must have that $a=b$.
However this would mean that $q=r$, a contradiction.
Thus we must have that $p \mid a+b$.
Again we have that $a,b$ are both odd and thus $2 \mid a+b \Longrightarrow 2p \mid a+b$.
But now $0 < a,b < 2p \Longrightarrow 0 \le a+b < 4p$.
Thus the only possibility is $a+b=2p,a=b=0$.
It is easy to see that $a=b=0$ gives $q=r$, which is not possible.
Thus we must have that $a+b=2p$.
Now note that $(a+\sqrt{-d})(b+\sqrt{-d})=(ab-d)+(a+b)\sqrt{-d}$.
Now we see that $a \equiv - b$ (mod p) and thus $ab-d \equiv -a^2-d \equiv 0$ (mod p).
Thus $p \mid ab-d$.

Now note that we also have that $a,b,d$ are odd. Thus $2 \mid ab-d \Longrightarrow 2p \mid ab-d \Longrightarrow \exists x \in \mathbb{Z}$ such that $ab-d=2px$.
Now also recall that $a+b=2p$.
Thus $(a+\sqrt{-d})(b+\sqrt{-d})=2px+2p\sqrt{-d}=2p(x+\sqrt{-d})$.
So taking norms on both sides and using multiplicativity of norms and (3) and (4), we get that :
$(4pq)(4pr)=4p^2(x^2+d) \Longrightarrow x^2+d=4qr$.
WLOG assume $x \ge 0$.
Now since $d \equiv 3$ (mod 4), we have that $x^2 \equiv 1$ (mod 4) and thus x is odd. Thus $x=2y+1$ for some $y \in \mathbb{Z}$ with $y \ge 0$.
So plugging in, we get that :
$(2y+1)^2+d=4qr \Longrightarrow y^2+y+k=pr$, as desired.
This proves the lemma.
\end{proof}

Now back to the main problem, construct a graph G with vertices as $p_1,....,p_n$ and we say $p_i \sim p_j$ iff: $\exists x \in \mathbb{N}_0$ such that $p_i p_j=x^2+x+k$.
So it suffices to show that $G$ has atmost one hamiltonian cycle.
We prove this by induction on n.
Base case : $n=3$ -> trivial.
Now suppose it holds for $n-1$.
Now if G has no hamiltonian cycle, then we are trivially done.
So suppose G has a hamiltonian cycle.
WLOG we can assume that $p_1 \sim p_2 \cdots p_n \sim p_1$.
WLOG let $p_n$ be the largest prime from $p_1,...,p_n$.
Now first we show that $deg(p_n)=2$.
Now we have that $p_1 \sim p_n$ and $p_{n-1} \sim p_n$ and $p_n>p_1,p_{n-1}$.
Let $p_np_1=x^2+x+k$ and $p_np_{n-1}=y^2+y+k$.
Then from the proof of the lemma, we know that $(2x+1)+(2y+1)=2p \Longrightarrow x+y=p-1$.
Now suppose $\exists 1 \le j \le n-1$ such that $p_j \sim p_n$.
Then we have that $p_np_j=z^2+z+k$. Now if $p_j \neq p_1$, then again by same argument, we have that $x+z=p-1=x+y \Longrightarrow y=z \Longrightarrow p_np_j=p_np_{n-1} \Longrightarrow p_j=p_{n-1}$ ie $j=n-1$
So we have that $p_n \sim p_i$ iff : $i=1$ or $i=n-1$.
Thus $deg(p_n)=2$.
Now from the lemma we also know that $\exists u \in \mathbb{N}_0$ such that $p_{n-1}p_1=u^2+u+k \Longrightarrow p_{n-1} \sim p_1$.
So now consider $H=G/\{p_n\}$.
Then since $p_1 \sim p_{n-1}$, we have that $p_1 p_2 .... p_{n-1}$ is a hamiltonian cycle of H.
So by induction hypothesis we know that $p_1 p_2 \cdots p_{n-1}$ is the unique hamiltonian cycle of H.
Thus since $deg(p_n)=2$, we have that $p_1 p_2 \cdots p_n$ is the unique hamiltonian cycle of $G$.
This completes the induction step.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
renrenthehamster
40 posts
#25
Y by
I have done up a video solution for the day 1 problems and discussion of the statistics here: https://www.youtube.com/watch?v=nYD-qIOdi_c
Hopefully it is easier to understand the long-ish solution through a video. It's similar to some of the approaches above but I think we need to handle the annoying problem of "positive integer $x$" with some care. For example in the first solution on this forum page, how do we know that $a$ and $b$ are positive if the OP decided to prove the general problem? It's not a simple typo that can just be dropped. Without $a$ and $b$ positive, now it is not clear that $a$ and $b$ are uniquely determined in the next part of the solution. :P
This post has been edited 1 time. Last edited by renrenthehamster, Jul 16, 2022, 1:29 PM
Reason: .
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
PUjnk
71 posts
#26
Y by
In my proof I only need x is non-negative. So I think the generalization to "x is non-negative" is fine.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
S.Ragnork1729
215 posts
#27
Y by
My Same Solution of the Problem : Call a pair of odd primes $(p, q)$ Favourable if $pq$ can be written as $x^2+x+k$ for some $x$. Let us head on by proving two lemmas below .

Lemma 1. If $p>q>r$ are odd primes with $(p, q)$ Favourable and $(p, r)$ Favourable, then $(q, r)$ is Favourable .
Proof : Let $pq=x^2+x+k$ and $pr=y^2+y+k$. Then we have
\[p(q-r) = (x-y)(x+y+1)\]Note that since $p>q>r$, we have $y<x<p$ and thus $0 < x-y < p$ and $0 < x + y + 1 < 2p$. Since we must have $p$ dividing one of $x-y$ and $x+y+1$, we must have $p=x+y+1$ and thus $x-y=q-r$.

Then let $d=x-q=y-r$. We have
\begin{align*}
d^2+d+k&=(x-q)^2+(x-q)+k\\
&=x^2-2qx+q^2+x-q+k\\
&=pq-2qx+q^2-q\\
&=q(p-2x+q-1)\\
&=q(y-x-q)\\
&=qr
\end{align*}so $(q, r)$ is Favourable .


Lemma 2. If $p>q>r>s$ are odd primes, we cannot have all pairs among them Favourable.
Proof : Suppose otherwise. Let $pq=x^2+x+k, pr=y^2+y+k, ps=z^2+z+k$. From the proof of the previous lemma, we have $p=x+y+1=x+z+1=y+z+1$, so $x=y=z$ and thus $q=r=s$, contradiction.

Proceeding by induction on $|S|$. The trivial case $|S|=4$ follows from Lemma 2. Suppose we have two circular arrangements of $S$. Let $p$ be the largest element of $S$, then, by Lemmas 1 and 2 combined, $p$ must have the same neighbors $q,r$ in both arrangements.

By Lemma 1, $(q, r)$ is Favourable Thus if we remove $p$ from both circular arrangements and connect $q$ and $r$, we get valid circular arrangements for $S\backslash\{p\}$. By the inductive hypothesis, these must be the same, so the original arrangements were the same, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dgrozev
2463 posts
#28 • 2 Y
Y by rafayaashary1, Rijul saini
Translated into graph theory language the problem looks like:

We have an (infinite) graph $ G$ with vertices all odd prime numbers. Two vertices $ p$ and $ q$ are connected if and only if there exists a positive integer $ x$ such that $ pq=x^2+x+k.$ We want to prove that any finite subgraph $ H$ of $ G$ contains at most one Hamiltonian cycle.

This is a very strong claim about a graph. Its structure should not be so complicated. For instance, it holds if every vertex of $ G$ has a degree at most $ 2$. We can try it as a first idea, though unfortunately this is not true. Trying to prove the degrees are 2 or less, we, of course, are doomed, but we could establish that it's "almost" true. Each vertex $ p$ is connected with at most two other vertices less than $ p$. Here, by "less" we mean the natural order of the primes. This is the easier part - there are only two properties of $ G$ we need, this is the first one.

Lemma 1. Each vertex (prime number) $ p$ is connected with at most two primes less than $ p$.

Proof. Suppose, a prime $ p>2$ is connected to two primes $ q,r$ with $ p>q>r>2$. Then there exist two positive integers $ x,y$ such that

$$ pq=x^2+x+k\,;\, pr=y^2+y+k\qquad (1)$$
Subtracting the two equalities, we get

$$ p(q-r)=(x-y)(x+y+1)$$
Since $ p$ is the biggest one among $ p,q,r,$ by $ (1)$ we obtain $ x,y<p,$ thus $ p$ cannot divide $ x-y$, hence it divides $ x+y+1,$ but $ x+y+1<2p$ therefore $ x+y+1=p.$ I think, almost every contestant has discovered this fact. One step further lies the observation that $ p$ cannot be connected to another prime (apart from $ q,r$) that is less than $ p$. Indeed, if $ s$ is a prime $ s<p$ and $ ps=z^2+z+k$ the same argument yields $ x+z+1=p$ therefore $ z=y$ and $ s=r.$ $ \blacksquare$

What we have established till now is that $ G$ is (so called) 2-degenerate graph. A graph is 2-degenerate if its vertices can be enumerated as $ v_1,v_2,\dots$ such that $ v_{j}$ is connected to at most two vertices among $ v_1,v_2,\dots,v_{j-1}$.
Unfortunately, this property is not enough to prove the uniqueness of Hamiltonian cycles. Bellow is a picture that presents a two degenerate graph with two Hamiltonian cycles.

https://dgrozev.files.wordpress.com/2022/07/imo-2022-p3.png

Indeed, the vertices can be ordered like it's shown: 1,2,3,4,5, and every next vertex is connected with at most two of the previous ones. However, there are two Hamiltonian cycles: 1,2,3,5,4,1 and 1,3,5,4,2,1.

The next claim is the toughest NT part of this problem and is the key property $ G$ satisfies.

Lemma 2. Let $ p>2$ be a prime number, connected to $ q$ and $ r\,,\, p>q>r>2.$ Then $ q$ and $ r$ are also connected.

Proof. Let $ pq=x^2+x+k, pr=y^2+y+k$. As we showed $ p>x>y$ and

$$ \displaystyle p(q-r)=(x-y)(x+y+1).$$
It implies $ p=x+y+1$. Let us set $ x=p-s, y=s-1$ where $ 1<s<p.$ Further,

$$ pq=p^2-2ps+p+s^2-s+k\,;\, pr=s^2-s+k\qquad (2)$$
Hence, $ p\mid s^2-s+k$ and let $ s^2-s+k=up.$ Multiplying the equalities in $ (2)$ we get

$$ qr=u(p-2s+1+u)=u^2-2us+u+up\qquad (3)$$
Putting back in $ (3)$ $ up=s^2-s+k$ we obtain

$$ qr=(u-s)^2 +(u-s) +k$$
Thus, we showed $ qr=z^2+z+k$ where $ z\in\mathbb{Z}$. Here, we have a "small" issue since it may happen $ z\le 0$. If one trace back what $ u$ and $ s$ were, one can it's mostly the case. Fortunately, if we can represent $ qr$ as $ qr=z^2-z+k$ where $ z> 0$ we can represent it also as $ qr=(z-1)^2+(z-1)+k$. $ \blacksquare$

What we actually proved is that $ qr$ can be represented as $ z^2+z+k$ where $ z\geq 0$. It's slightly annoying since $ q$ and $ r$ are connected if and only if $ qr$ is representable as $ z^2+z+1$ and $ z\in \mathbb{Z}^+.$ We cannot do anything, but to change the statement of the problem. Allow the vertices $ p,q$ be connected even if $ pq=0^2+0+k=k.$ It cannot change anything, since if we prove the claim for a graph obtained by adding a few more edges, it will be also true for the original graph.
That said, let's recap. We proved the graph $ G$ has the following two properties.

(i) The vertices of $ G$ can be ordered $ v_1,v_2,\dots$ such that $ v_j, j\ge 2$ is connected with at most two among the vertices $ v_1,v_2,\dots,v_{j-1},$ and
(ii) If $ v_j$ is connected to $ v_{\ell}$ and $ v_{m}, \ell, m<j$ then $ v_{\ell}$ and $ v_m$ are also connected.

This is enough to prove that there does not exist a subgraph $ H$ of $ G$ with two distinct Hamiltonian cycles. The argument is simple. Suppose there is a subgraph $ H$ like that and let the vertex $ v_m$ be the first one so that $ H$ appears after adding it. That is, there is no subgraph like that in the graph $ G'$ induced by $ v_1,v_2,\dots,v_{m-1}$ but there is one, say $ H$, in the graph $ G''$ induced by $ v_1,v_2,\dots,v_{m-1},v_m.$ Apparently, $ v_m\in H$ since it's the first time $ H$ appears. It also means $ v_m$ is connected to exactly two vertices $ v_i,v_j, i,j<m$ and $ v_i,v_j\in H$. So, we have at least two Hamiltonian cycles in $ H$ and both pass trough $ v_m$ like $ \dots v_i\, v_m\,v_j\,\dots$. Since $ v_i$ and $ v_j$ are connected, by (ii) it yields there are also two Hamiltonian cycles in $ H-v_m,$ contradiction.

Remark. More analysis and comments on this problem can be found on my blog.
This post has been edited 1 time. Last edited by dgrozev, Jul 27, 2022, 8:28 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
marcin
8 posts
#29 • 3 Y
Y by gvole, Mango247, Mango247
This is indeed a very nice problem. With not much more effort than what has been observed in previous posts one can show the following.

Theorem. Let $p_1<p_2$ be odd primes such that $p_1p_2=w^2+w+k$ for some $w\geq 0$ (such $w$ is unique, if it exists). Let $p$ be an odd prime. Then $pp_1$ and $pp_2$ are both of the form $x^2+x+k$ for some integer $x$ if and only if $p=p_1+p_2\pm (2w+1)$ ($x=w\pm p_i$ works for $p$ and $p_i$).

This result can be used to construct sets $S$ of primes which can be arranged as in the problem. For example, starting with $w=1$, $k=53$, $p_1=5$, $p_2=11$ we get a circle of primes: $5,13,101,43,11,19,107,269,37$ (in that order).
This post has been edited 1 time. Last edited by marcin, Jul 28, 2022, 2:59 PM
Reason: correct typesetting
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
62861
3564 posts
#30 • 18 Y
Y by samrocksnature, rama1728, L567, a1267ab, megarnie, Justpassingby, mira74, pog, Quidditch, Grizzy, Miquel-point, CyclicISLscelesTrapezoid, PRMOisTheHardestExam, Assassino9931, EpicBird08, math_comb01, NO_SQUARES, MS_asdfgzxcvb
I don't really use this site anymore for various reasons, but I hope you all enjoyed the problem! Here's a postmortem, I suppose.

As you might guess, my only real regret with this problem is not noticing the glitch that arises with the statement having "positive integer $x$" in it. That was not intentional, and I feel quite bad for the people who had to agonize over it. (Though apparently neither the PSC nor the jury noticed it either, so I don't feel that bad about not realizing that subtlety.)

Other than that, I'm really happy with the problem, and I'm glad that in the end, this is the problem of mine that made it onto the IMO. To be honest, I had my hopes: we all know how neglected N is at the IMO, and this problem is hard in a non-technical way: an enormous plus for gaining jury approval. But I didn't want to hope, since getting problems onto the IMO is basically a crapshoot.

Those of you who know me will know that I'm a big fan of "surprising" problems; I typically use USA TSTST 2019/9 as my main example. A lot of people don't seem to like this kind of problem (maybe because the actual math content is usually not inherently as interesting), but as a designer, I love providing that kind of experience, as well as receiving it. So it shouldn't come as a surprise that I really like this problem, too. Even after all these months, I still can't believe the main claim is true... it just feels so absurd, ya know? I'm really glad I was able to package the main claim into a nice extraction: if I just asked to prove the main claim, it would still be surprising, but much more boring.

I'm a bit surprised I haven't seen the main claim before, actually. It feels like the sort of thing that'd be famous in algebraic number theory circles, for example. But I guess not.
Fun fact I: the main claim is actually true for USAMO 2020/4 as well. To elaborate, spoilers!

Fun fact II: the first draft of this problem was the same, but it involved $x^2 + k$ instead of $x^2 + x + k$. The solution is essentially the same, but after thinking about it for a bit, I realized that the problem was basically unusable unless I changed the expression $x^2 + k$. Why?

Fun fact III: This statement might seem really stupid, in the sense that surely large prime rings don't exist at all. That's what I thought too, until I decided to see for myself. In the end, I ended up discovering a ring of 385 primes. I spent relatively little computer time discovering it (and had some inefficiencies in my scripting), so I invite everyone to try and beat that record! The 385-prime ring I found
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rama1728
800 posts
#31
Y by
CantonMathGuy wrote:
I don't really use this site anymore for various reasons, but I hope you all enjoyed the problem! Here's a postmortem, I suppose.

As you might guess, my only real regret with this problem is not noticing the glitch that arises with the statement having "positive integer $x$" in it. That was not intentional, and I feel quite bad for the people who had to agonize over it. (Though apparently neither the PSC nor the jury noticed it either, so I don't feel that bad about not realizing that subtlety.)

Other than that, I'm really happy with the problem, and I'm glad that in the end, this is the problem of mine that made it onto the IMO. To be honest, I had my hopes: we all know how neglected N is at the IMO, and this problem is hard in a non-technical way: an enormous plus for gaining jury approval. But I didn't want to hope, since getting problems onto the IMO is basically a crapshoot.

Those of you who know me will know that I'm a big fan of "surprising" problems; I typically use USA TSTST 2019/9 as my main example. A lot of people don't seem to like this kind of problem (maybe because the actual math content is usually not inherently as interesting), but as a designer, I love providing that kind of experience, as well as receiving it. So it shouldn't come as a surprise that I really like this problem, too. Even after all these months, I still can't believe the main claim is true... it just feels so absurd, ya know? I'm really glad I was able to package the main claim into a nice extraction: if I just asked to prove the main claim, it would still be surprising, but much more boring.

I'm a bit surprised I haven't seen the main claim before, actually. It feels like the sort of thing that'd be famous in algebraic number theory circles, for example. But I guess not.
Fun fact I: the main claim is actually true for USAMO 2020/4 as well. To elaborate, spoilers!

Fun fact II: the first draft of this problem was the same, but it involved $x^2 + k$ instead of $x^2 + x + k$. The solution is essentially the same, but after thinking about it for a bit, I realized that the problem was basically unusable unless I changed the expression $x^2 + k$. Why?

Fun fact III: This statement might seem really stupid, in the sense that surely large prime rings don't exist at all. That's what I thought too, until I decided to see for myself. In the end, I ended up discovering a ring of 385 primes. I spent relatively little computer time discovering it (and had some inefficiencies in my scripting), so I invite everyone to try and beat that record! The 385-prime ring I found

Nice! Why don't you use AoPS though...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
little-fermat
147 posts
#32 • 1 Y
Y by Mango247
I have discussed this problem on my YouTube channel "little fermat".
Video link: Video Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ramanujan1057894736842
15 posts
#33
Y by
Can someone please verify this solution
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around the circle such that the product of any two neighbors is of the form $x^2+x+k$ for some positive integer $x$.

Let $p_1,p_2,\ldots,p_n$ be the odd prime numbers in $S$, listed in clockwise order around the circle. For each $i=1,2,\ldots,n$, let $x_i$ be a positive integer such that $p_{i-1}p_{i+1}=x_i^2+x_ik$ (where we interpret $p_0=p_n$ and $p_{n+1}=p_1$). We want to show that the values $x_1,x_2,\ldots,x_n$ uniquely determine the placement of the primes around the circle, up to rotation and reflection.

First, note that $x_i$ is uniquely determined by $p_{i-1}$ and $p_{i+1}$. Indeed, if $x_i'$ is another positive integer such that $p_{i-1}p_{i+1}=x_i'^2+x_i'k$, then $x_i^2+x_ik=x_i'^2+x_i'k$, so $x_i=x_i'$.

Let $S'$ be the set of positive integers $x_1,x_2,\ldots,x_n$. Note that if we have two different circle arrangements of $S$ that satisfy the given condition, then the corresponding sequences of $x_i$'s must be the same (up to cyclic permutation). Otherwise, there would be some $i$ such that $x_i$ in one sequence differs from $x_i$ in the other sequence, and we could use this to find two neighboring primes whose product is not of the form $x^2+x+k$.

Therefore, it suffices to show that the sequence $S'$ uniquely determines the circle arrangement of $S$ up to rotation and reflection. We will prove this by induction on $n$. The base case $n=1$ is trivial.

Now suppose $n>1$ and the claim is true for smaller values of $n$. Without loss of generality, we may assume that $p_1=3$. Then $p_2$ is odd and we have $p_1p_2=x_1^2+x_1k$, so $x_1$ is uniquely determined by $p_2$. Note that $x_1>1$, since $p_1p_2=x_1(x_1+k)\geq 2x_1$. Therefore, we can define a new sequence $S''$ by replacing the first element $x_1$ of $S'$ with $x_1-1$. By induction, the sequence $S''$ determines the circle arrangement of the remaining primes (listed in clockwise order from $p_2$). Moreover, we can recover $x_1$ from $S''$ and $p_2$ using the equation $p_1p_2=(x_1-1+k)(x_1-1)+x_1-1$, so the circle arrangement of $p_1$ and $p_2$ is also determined.

Therefore, the sequence $S'$ determines the circle arrangement of $S$ up to rotation and reflection, as desired.
This post has been edited 1 time. Last edited by Ramanujan1057894736842, Mar 10, 2023, 2:20 AM
Reason: .
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peppapig_
281 posts
#34 • 5 Y
Y by player01, john0512, Significant, mulberrykid, EpicBird08
Claim 1.
Fix set $S$ and the integer $k$ and let $q$ be the largest prime in $S$. We claim that if there is such a circular configuration (as described in the problem), then the numbers next to $q$ are fixed.

1. We claim that there are at most $2$ integers $0\leq{}x\leq{}q$ such that $x^2+x+k\equiv{}0$ (mod $q$). If there is no such number, then we are done. Say there is such a number that we know works (where "works" means that $x^2+x+k\equiv{}0$ (mod $q$)), call it $a$. If $a$ is the only number that works. Otherwise, let there be another number, $b$ such that $b$ "works". We claim that $b$ is either $a$ or $q-1-a$ mod $q$.

We have that $a^2+a+k\equiv{}b^2+b+k$ (mod $q$). Subtracting, we get
\[(a^2-b^2)+(a-b)\equiv{}0 \text{ (mod } q)\iff{}(a-b)(a+b+1)\equiv{}0 \text{ (mod } q)\]and since $q$ is prime, this implies that either $q\mid{}a-b$ or $q\mid{}a+b+1$, meaning that $b$ is either $a$ or $q-1-a$ mod $q$.

2. Let the two primes next to $q$ be $p$ and $r$. We claim that if we let $pq=a^2+a+k$ and $qr=b^2+b+k$, we must have $a+b=q-1$. Notice that if $p,r<q$, we have that $a,b<q$ which immediately rules out the possibility that $a\equiv{}b$ mod $q$. Since $a+b\leq{}2q-2$, we also have that $a+b=q-1$, since the sum cannot be $2q-1$ or greater, and the sum must be $-1$ mod $q$.

3. Since by $\textcircled{1}$ and $\textcircled{2}$, $a$ and $b$ are unique if they exist, we have that $p$ and $r$ must also be unique, proving our claim.

Claim 2.
We claim that if we have three primes such that $p,r<q$ and $pq$ and $qr$ are both expressible as $x^2+x+k$ for some positive integer $x$, then $pr$ is also expressible as $x^2+x+k$ for some $x$.

1. We will prove the claim that "if $x^2+x+k=pq$ and $(q-1-x)^2+(q-1-x)+k=qr$**, then $\frac{(q-1-x)^2+(q-1-x)+k}{(x-p)^2+(x-p)+k}=\frac{q}{p}$. Note that if this claim is true, it immediately follows that $(x-p)^2+(x-p)+k=pr$, finishing the proof of Claim 2.

**Recall that from Claim 1, if $f(x)=x^2+x+k=pq$, then $f(q-1-x)=qr$, therefore $(q-1-x)^2+(q-1-x)+k=qr$.

2. Expanding the above equation and replacing all $x^2+x+k$ with $pq$, we end up with $\frac{x^2+x+k+p^2-2px-p}{x^2+x+k+q^2-2qx-q}=\frac{pq+q^2-q(2x+1)}{pq+p^2-p(2x+1)}=\frac{q(p+q-2x-1)}{p(p+q-2x-1)}$ which is clearly equal to $\frac{q}{p}$, proving our claim.

Inductive Step.
First, notice that if there are $2$ primes in $S$, then there is trivially at most $1$ way, and we would be done.

Consider any set with more than 3 elements. Suppose S has a configuration satisfying the problem conditions. Now take out the largest prime number from that configuration. By combining Claims 1 & 2, then remaining prime numbers must also be a circular configuration that satisfies the problem conditions. Since if there is a circular configuration that satisfies the problem conditions, the largest prime must have a fixed spot that it can be placed in in the circle (if there is a valid one), meaning the new set $S$ with the largest prime has at most the number of configurations the set without the largest prime did.

Since a set $S$ with two primes has at most $1$ configuration, any set $S$ has at most $1$ configuration, and we are done.
This post has been edited 6 times. Last edited by peppapig_, May 21, 2023, 5:16 PM
Reason: Readability + typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leo.Euler
577 posts
#37 • 3 Y
Y by Billybillybobjoejr., trk08, OronSH
Now this is the best ISL number theory problem I have done as of now. It possesses some really nice ideas and motivations behind them. Here we prove the result where the condition holds for nonnegative integers $x$. In what follows, we prove two number theoretic claims and then induct on the logical graph formulation whence we apply those claims.
We say that a pair of primes $(p, q) \in S^2$ is representative if there exists an nonnegative integer $x$ such that $pq=x^2+x+k$.

Claim: Given a prime $p \in S$, there are at most two distinct primes smaller than $p$ in $S$ such that they form representative pairs with $p$.
Proof. Suppose that $(p, q)$ and $(p, r)$ are representative pairs; it suffices to show that no prime $s$ different from $p, q, r$ less than $p$ is in $S$ such that $(p, s)$ is representative. We can write \[ pq=x^2+x+k \]\[ pr = y^2+y+k \]for nonnegative integers $x$ and $y$. Subtracting the equations, we have $p(q-r)=(x-y)(x+y+1)$. Since $x$ and $y$ have to both be less than $p$ (as otherwise the RHS of both of the above equalities will clearly exceed $p^2$), we must have $-p<x-y<p$, and $x-y \neq 0$ as $q-r \neq 0$. Thus, $p \nmid x-y$, so $p \mid x+y+1$. But since $0 \le x, y < p$, we must have \[ x+y+1=p. \]Now since $(p, s)$ is representative, there is a nonnegative integer $z$ such that $ps=z^2+z+k$ for some nonnegative integer $z$. We analogously have \[ x+z+1=p, y+z+1=p, \]so $x=y=z$, but this is a contradiction as $q, r, s$ are distinct. :yoda:

Claim: Given a prime $p \in S$ and distinct primes $q, r \in S$ smaller than $p$ such that $(p, q)$ and $(p, r)$ are representative, $(q, r)$ is also representative.
Proof. Let $pq=x^2+x+k$ and $pr=y^2+y+k$ for nonnegative integers $x$ and $y$. By subtracting the two equations and applying appropriate bounding on $x, y$ as in the previous proof, we obtain $p=x+y+1$. Now let $a=x+\tfrac{1}{2}$, $b=y+\tfrac{1}{2}$, and $\ell = k - \tfrac{1}{4}$. Then $a+b=p$, and \[ pq=a^2+ \ell, \]\[ pr = b^2 + \ell. \]By the Brahmagupta-Fibonacci identity, it follows that \[ p^2qr = (pq)(pr) = (ab-\ell)^2 + (a+b)^2\ell = (ab - \ell)^2+\ell p^2, \]so \[ qr = (pq)(pr)/(p^2) = \left(\frac{ab-\ell}{p}\right)^2 + \ell. \]I contend that $\tfrac{ab-\ell}{p}-\tfrac{1}{2}$ is an integer.

Note that $-2xy \equiv (x+y)(x+y+1)-2xy \equiv (x^2+x)+(y^2+y) \equiv -2k \pmod{p}$, so $xy \equiv k \pmod{p}$. Thus, \[ p \bigg(\frac{ab-\ell}{p}-\frac{1}{2}\bigg) = ab-\ell - \frac{p}{2} = (x+1/2)(y+1/2) - k + 1/4  - \frac{p}{2} = xy - k \equiv 0 \pmod{p}, \]so $\tfrac{ab-\ell}{p}-\tfrac{1}{2}$ is an integer, as claimed. This means that $(q, r)$ is representative, as desired. :yoda:

Now we take the graph formulation of the problem. Let the elements of $S$ have corresponding vertices $v_1, \ldots, v_n$ in order of size. Then consider a graph $G$ on those vertices such that, (1) for each $1< i \le n$, at most two of the vertices among $v_1, \ldots, v_{i-1}$ are connected with $v_i$, and (2) for each $1< i \le n$, if $v_i$ is connected to two vertices $v_j, v_k$ where $j \neq k$ and $j, k < i$, then $v_j$ is connected to $v_k$. From the previous two claims, the problem can be reformulated as the following lemma.

Lemma: Any subgraph $H$ of $G$ has at most one Hamiltonian cycle.
Proof. Induct on $n$, where the base cases $n=1, 2, 3$ are trivially true. Consider $G$ with $n=k$, and suppose the lemma holds for this graph. Then add a vertex $v_{k+1}$ to the graph, and connect to it at most two vertices, and in the case of $v_{k+1}$ having degree $2$, connect its two neighbors. By inductive hypothesis, we only have to consider the Hamiltonian cycles of subgraphs containing $v_{k+1}$. If $\deg(v_{k+1}) \le 1$, then all such subgraphs do not have a Hamiltonian cycle. On the other hand, if $\deg(v_{k+1})=2$, and if we label the neighbors of $v_{k+1}$ as $u$ and $v$, then it suffices to show that $u$ and $v$ are not contained in a subgraph with more than $1$ Hamiltonian cycle; however, this is clear by inductive hypothesis. This completes the induction. :yoda:

:starwars:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5001 posts
#38
Y by
what the heck z antiproblem. modern day miracle.

Relax the condition to $x$ being a nonnegative integer. We induct on $|S|$ (with $k$ fixed), with $|S| \leq 3$ being essentially vacuous. Suppose $|S| \geq 4$ and the statement has been proven for $|S|-1$.

Suppose that an arrangement exists. Let $p$ be the largest prime in $S$. Then there are at most two solutions modulo $p$ to $x^2+x+k \equiv 0 \pmod{p}$, hence at most two solutions $0 \leq x_2<x_1 \leq p-1$. We have the following.

Claim 1: In any arrangement, if $q$ is adjacent to $p$, then we must have $pq=x_i^2+x_i+k$ for some $i \in \{1,2\}$.
Proof: Suppose $pq=r^2+r+k$ where $r \geq 0$. Then $r \equiv x_1,x_2 \pmod{p}$. On the other hand, if $r \geq p$, then $r^2+r+k>p^2>pq$: contradiction. $\blacksquare$

Since we have at most $2$ choices for $i$, the two primes $q_1>q_2$ adjacent to $p$ are fixed in any configuration, and we have $pq_i=x_i^2+x_i+k$ for $i=1,2$. We now prove the following key claim.

Claim 2: In fact, $q_1q_2$ is of the form $x^2+x+k$ for some nonnegative $x$ as well.
Proof: First subtract the two given equations to obtain $p(q_1-q_2)=(x_1-x_2)(x_1+x_2+1)$. $p$ must divide some term of the RHS, but it can't be $x_1-x_2 \leq p-1$, hence $p \mid x_1+x_2+1$. On the other hand, since $x_1+x_2+1 \leq 2p-1$, it follows that $x_1+x_2+1=p$, so $x_1-x_2=q_1-q_2$. Solving for $x$ yields $x=\tfrac{(p+q_1+q_2)-1}{2}$, hence
$$\frac{(p+q_1+q_2)^2-1}{4}+k=pq_1 \implies -k=\frac{(p^2+q_1^2+q_2^2)-2q_1q_2-2p(q_1+q_2)-1}{4}.$$We now consider the determinant of $x^2+x-(q_1q_2-k)$; it equals
$$1+4(q_1q_2-k)=1+4\left(q_1q_2+\frac{(p^2+q_1^2+q_2^2)-2q_1q_2-2p(q_1+q_2)-1}{4}\right)=1+(p^2+q_1^2+q_2^2)+2q_1q_2-2p(q_1+q_2)-1=(p-(q_1+q_2))^2.$$Since $p,q_1,q_2$ are odd, this is odd as well, and since it's a square it follows that $x^2+x+k=q_1q_2$ has a nonnegative integer solution by the quadratic formula. $\blacksquare$

Then if we have two different arrangements of the elements of $S$ (both which have $q_1,q_2$ adjacent to $p$), then delete $p$ in both to get two different arrangements of the elements of $S \setminus \{p\}$, contradicting the inductive hypothesis. $\blacksquare$
This post has been edited 2 times. Last edited by IAmTheHazard, Sep 30, 2023, 10:11 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Inconsistent
1455 posts
#39
Y by
Beautiful!

Downward induct in triangles: key claim is that the two smaller children of any new integer (adding prime numbers from least to greatest) must themselves be children of one another. (Where children means an edge to a smaller prime and two primes are connected by an edge if $pq - (4k-1)$ is a perfect square. The result can be obtained by a clever Vieta-esque jump on $x^2 - 2(a+b)x + (a-b)^2 + (k - 1) = 0$ or outright algebraic bash. Truly quite elegant! To end, simply eliminate the largest element of the cycle and claim uniqueness.
This post has been edited 1 time. Last edited by Inconsistent, Nov 28, 2023, 1:38 AM
Reason: edit
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1712 posts
#40
Y by
First, we'll reduce the condition on $x$ to nonnegative integers. Call an unordered pair $(p,q)$ of distinct odd prime numbers good if $pq$ is of the form $x^2+x+k$ for some nonnegative integer $x$. We claim that if $(p,q)$ and $(p,r)$ are good, and $p>q,r$ then $(q,r)$ is good. Let $pq=a^2+a+k$, $pr=b^2+b+k$. Then, $p(q-r)=(a-b)(a+b+1)$. If $p\mid a-b$ then $a+b+1\mid q-r$ so $p\le a-b<a+b+1\le q-r<p$, a contradiction. Thus, $p\mid a+b+1$. Let $a+b+1=ps$ then
\[4p^2=2p(q+r)=2(a^2+b^2+a+b+2k)>(a+b)^2+2a+2b+4k=(a+b)(a+b+2)+4k>(a+b+1)^2=p^2s^2\]so $s^2<4$ implying that $s=1$. Thus, $a+b+1=p$, so $q-r=a-b$. Let $a=q+t$ and $b=r+t$ then $p=q+r+2t+1$ and $q(q+r+2t+1)=(q+t)^2+(q+t)+k$ which implies $qr=t^2+t+k$, as desired.

Suppose that the smallest set for which there are at least two different ways whose elements can be placed in a way that satisfies the conditions mentioned is $S$, then in each situation, we can remove the largest prime. By our claim, the remaining circle still satisfies the conditions. Since we remove largest prime, there are at most two solutions to $x^2+x+k$ being divisible by that largest prime, so the neighbors of the prime we removed are known. However, by minimality we must be left with the same configuration, contradiction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Acclab
33 posts
#41
Y by
For each $p_1$ with neighbors $p_2$ and $p_3$, such $k$ exists so both $p_1p_2 = a^2+a+k$ and $p_1p_3 = b^2+b+k$ for some positive integer $a, b$ (where WLOG $p_3>p_2$) if and only if
$$ p_1(p_3-p_2) = (b-a)(b+a+1).$$for some $a$, $b$. If furthermore $p_1>p_3>p_2$, then a size argument is available. Since $p_1 | b-a$ implies $b+a+1 \leq p_3-p_2 < p_1 \leq b-a $, a contradiction, we know $b+a+1 = rp_1$ and $b-a = \frac{p_1}{r}$ for some $r \in \mathbb{N}$. Solving we get:
$$a = \frac{rp_1-\frac{p_3-p_2}{r}-1}{2}, b = \frac{rp_1+\frac{p_3-p_2}{r}-1}{2}.$$This implies $b \geq p_1$ if $r \geq 2$, which yields $b^2+b+k > p_1^2 > p_1p_3$, a contradiction. Thus
$$a = \frac{p_1-p_3+p_2-1}{2}, b = \frac{p_1+p_3-p_2-1}{2}.$$Calculation gives $k = \frac{2p_1p_2+2p_2p_3+2p_1p_3 - p_1^2 - p_2^2 - p_3^2 + 1}{4}$. That is to say, $k$ is uniquely determined by the values of $p_1, p_3, p_2$.

Notice that $k$ is symmetric to $p_1, p_2, p_3$, and without the size argument, the solutions to $a, b, k$ also works. This idea gives rise to the following claim.

Claim. Fix $k \in \mathbb{N}$. Denote $p_1 \sim p_2$ if $p_1p_2 = x^2+x+k$ for some $x$. Then if $p_1>p_3>p_2$ and both $p_1 \sim p_2$ and $p_1 \sim p_3$, then we also have $p_2 \sim p_3$.

Proof. Let $c = \frac{p_2+p_3-p_1-1}{2}.$ Since $a^2+a+k = p_1p_2$ and $b^2+b+k = p_1p_3$, we have that $c^2+c+k = p_2p_3$ if and only if the sum of the three formulae holds: $$(\frac{p_1+p_2-p_3}{2})^2 - \frac{1}{4} + k + (\frac{p_1-p_2+p_3}{2})^2 - \frac{1}{4} + k + (\frac{-p_1+p_2+p_3}{2})^2 - \frac{1}{4} + k = p_1p_2 + p_2p_3 + p_1p_3$$by plugging in the values of $a,b$ derived via the size argument. That reduces to $k = \frac{2p_1p_2+2p_2p_3+2p_1p_3 - p_1^2 - p_2^2 - p_3^2 + 1}{4}$, agreeing with the unique solution to $k$ given that $p_1 \sim p_2$ and $p_1 \sim p_3$, proving such choice of $c$ works, and thus $p_2 \sim p_3$ if $c>0$.

If $c<0$, we instead let $c \mapsto -1-c$ so $c^2+c$ agrees by Vieta. ($p_1=p_2+p_3$ is impossible for all these primes are odd. )

Remark. Denote $a \sim^kb$ to specify the value of $k$. A more heuristic way of discovering this claim is by noticing that solving $p_1 \sim^k p_3$, $p_1 \sim^k p_2$ gives (uniquely) $a = \frac{p_1-p_3+p_2-1}{2}, b = \frac{p_1+p_3-p_2-1}{2}$ and $k = \frac{2p_1p_2+2p_2p_3+2p_1p_3 - p_1^2 - p_2^2 - p_3^2 + 1}{4}$ with the size condition. Notice $k$ is symmetric in terms of $p_1, p_2, p_3$, and this is still a valid solution without the size condition, so shuffling the orders of $p_1, p_2, p_3$ would result in $c = \frac{p_2+p_3-p_1-1}{2}$ with the same $k$ as one solution to, say, $p_1 \sim^k p_2$ and $p_2 \sim^k p_3$. Since the value of $k$ agrees, this is exactly what we have in the claim.

The rest follows by induction on $|S|$. $|S| = 3$ is trivial. For $|S| \geq 4$, suppose $S$ admits the largest prime $p_1$. If in both configuration $p_1$ are adjacent to the same $p_2, p_3$, then $p_2 \sim p_3$ by our claim and thus we can remove $p_1$ from the set and replace the two configuration by removing $p_1$ from the circles while keeping their validity. If instead $p_1$ are adjacent to at least three different neighbors, say $p_2, p_3, p_4$. Denote $p_1p_2 = x^2+x+k$, then since $p_1\sim p_3$ and $p_1 \sim p_4$, it follows $$ x = \frac{p_1-p_3+p_2-1}{2} = \frac{p_1-p_4+p_2-1}{2}. $$Since these two values of $x$ admits different $x^2+x+k$, we have a contradiction.
This post has been edited 3 times. Last edited by Acclab, Jul 13, 2024, 9:07 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mr.Sharkman
498 posts
#42
Y by
We will prove this through induction. For $n=2,$ notice that there is only $1$ way to arrange the primes around the circle regardless of the condition, so this case is obvious.

Assume that this is true for $n.$ Now, take a set of $n+1$ primes in a configuration that works. Assume that $p$ is the largest prime, and let $q$ and $r$ be primes next to it.

Claim: If we delete $p$ from the circle, we still have a valid configuration.
Proof: Let $x^{2}+x+k = pq,$ and $y^{2}+y+k = pr.$
Then, $x^{2} < x^{2}+x+k =pq \le p^{2},$ so $x < p.$ Similarly, $y < p.$ Now, $$4(x^{2}+x+k) = (2x+1)^{2}+(4k-1),$$so $x,y$ are the two unique solutions less than $p$ such that $$(2x+1)^{2} \equiv (1-4k) \pmod p.$$This means that $(2x+1)+(2y+1)=2p.$ Now, let $m = 4k-1,$ and let $a = 2x-1.$ Then,
$$qr = \frac{pr \cdot pq}{p^{2}} = \frac{(a^{2}+m)((2p-a)^{2}+m)}{16p^{2}}.$$So,
$$qr = \frac{a^{2}(2p-a)^{2}+ma^{2}+m(2p-a)^{2}+m^{2}}{16p^{2}}.$$Thus,
$$qr = \frac{m(2a^{2}-4ap+4p^{2})+m^{2}+a(2p-a)}{16p^{2}} = \frac{1}{4}\left(\frac{a(2p-a)-pm}{p}\right)^{2}+\frac{m}{4}$$so $qr$ is of the form $x^{2}+x+k,$ as desired. Thus, we have proven the claim.

Now, notice that, if we add $p$ back to our set of primes, it must be next to $q$ and $r$ (as there are only $2$ values of $x,y$ which have $p \mid x^{2}+x+k, y^{2}+y+k,$ and $q$ and $r$ correspond to $x,y$). Thus, we have finished the inductive step.
This post has been edited 2 times. Last edited by Mr.Sharkman, Nov 8, 2024, 1:52 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bin_sherlo
716 posts
#43 • 1 Y
Y by farhad.fritl
We will show that the statement holds for nonnegative integers. Let $|S|=n$. We will induct on $n$. First, note that it holds for $n\leq 3$. Suppose that it's true for $n-1$. Let $p$ be the largest prime in $S$. If $p_ip_j=x^2+x+k$ for some nonnegative integer, then call $p_i,p_j$ friends.

Claim: $p$ has at most two friends.
Proof: Suppose that $pq=x^2+x+k, \ pr=y^2+y+k, \ ps=z^2+z+k$ for $p>q>r>s$. We have $p(q-r)=(x-y)(x+y+1)$ and if $p|x-y$, then $x+y+1|q-r$ which is impossible since $p\leq x-y<x+y+1<q-r<p$ does not hold. Thus, $p|x+y+1$. Similarily $p|y+z+1,z+x+1$ but these give that $p|(x+z+1)-(y+z+1)=x-y$ which contradicts.

Claim: If $p$ is friend with both $q>r$, then $q$ and $r$ are also friends.
Proof: We have $p|x+y+1$ and $x-y|q-r$. Set $pl=x+y+1$ and $(x-y)l=q-r$. If $l>1$, then
\[\frac{(x+y+1)^2}{2}\geq 2p^2>p(q+r)=x^2+y^2+x+y+2k\geq x^2+y^2+x+y+2\]However, $x^2+y^2+1+2xy+2x+2y>2x^2+2y^2+2x+2y+4$ implies $(x-y)^2+3<0$ which is impossible. Hence $l=1$. We see that $p=x+y+1$ and $x-y=q-r$. Thus, $x=\frac{p+q-r-1}{2}$ and $y=\frac{p-q+r-1}{2}$.
\[pq=(\frac{p+q-r-1}{2})(\frac{p+q-r+1}{2})+k\iff p^2+q^2+r^2+4k-1=2pq+2qr+2rp\]\[p^2+q^2+r^2+4k-1=2pq+2qr+2rp\iff qr=(\frac{p-q-r-1}{2})(\frac{p-q-r+1}{2})+k\]If $p+1\geq q+r$, then $qr=a^2+a+k$ for $a=\frac{p-q-r+1}{2}$ and if $p+1\leq q+r$, then $a=\frac{q+r-p-1}{2}$.

Since there is at most one hamiltonian cycle in $S \ \setminus \{p\}$ and $p$ must be neighbours with $q,r$ in a hamiltonian cycle in $S$, we get that there is at most one hamiltonian cycle in $S$ as desired.$\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomehuman
499 posts
#44
Y by
We will prove the statement with "positive" replaced by "nonnegative".

Let $n$ be the number of elements of $S$. We will use induction on $S$. The base case $n=3$ is obvious. Let $n>3$.
Create a graph where $p$ is connected to $q$ if $pq$ is of the form $x^2+x+k$. Assume toward a contradiction there is more than $1$ Hamiltonian cycle.

Let $p$ be the maximum element of $S$. Let $T = S\setminus \{p\}$.

Let $q, r<p$ be $p$'s neighbors.

Let $pq = a^2+a+k$ and $pr = b^2+b+k$. Then, $a, b \leq p$. There are at most two roots of $x^2+x+k\equiv 0\pmod{p}$, so $a$ and $b$ are those roots. So, $p$ must be connected to $q$ and $r$ in any Hamiltonian cycle.

Because $p-a-1$ is a root of $x^2+x+k\equiv 0\pmod{p}$, $b = p-a-1$. So, $a+b = p-1$.
We have
\[p(q-r) = (a-b)(a+b+1)\]\[p(q-r) = (a-b)p\]\[q-r = a-b\]\[a = \frac{p+q-r-1}2\]\[b = \frac{p-q+r-1}2.\]So,
\[pq = \left(\frac{p+q-r-1}2\right)^2 + \left(\frac{p+q-r-1}2\right)  + k\]\[-4k = p^2+q^2+r^2-2pq-2qr-2pr\]\[rq = \left(\frac{r+q-p-1}2\right)^2 + \left(\frac{r+q-p-1}2\right) + k.\]\[rq = \left(\frac{p-r-q-1}2\right)^2 + \left(\frac{p-r-q-1}2\right) + k.\]One of $\frac{p-r-q-1}2$ and $\frac{r+q-p-1}2$ is nonnegative.
So, $r$ and $q$ are connected.
In any Hamiltonian cycle, $p$ is connected to $q$ and $r$, so we can delete $p$ and connect $q$ and $r$. This reduces to the $n-1$ case.
Z K Y
N Quick Reply
G
H
=
a