MathLabs

Problem 3

Let kk be a positive integer and let SS 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 SS around a circle such that the product of any two neighbours is of the form x2+x+kx^2+x+k for some positive integer xx.
Step 3 of 6: Relate the two roots x,yx,y by Vieta's formulas
x+y+1=p,xy≡k(modp)x+y+1=p,\quad xy\equiv k\pmod p
Detailed analysis

If pq=x2+x+kpq=x^2+x+k and pr=y2+y+kpr=y^2+y+k are both good with 0≤x,y<p0\le x,y<p, then x,yx,y are the (at most two) roots of T2+T+k≡0(modp)T^2+T+k\equiv0\pmod p found above, so Vieta's formulas modulo pp give x+y≡−1(modp)x+y\equiv-1\pmod p and xy≡k(modp)xy\equiv k\pmod p; since 0<x+y<2p0<x+y<2p, this forces the exact integer equality x+y+1=px+y+1=p.