MathLabs

Problem 4

A set of positive integers is called fragrant if it contains at least two elements and each of its elements has a prime factor in common with at least one of the other elements. Let P(n)=n2+n+1P(n)=n^2+n+1. What is the smallest possible value of a positive integer bb such that there exists a non-negative integer aa for which the set {P(a+1),P(a+2),…,P(a+b)}\{P(a+1),P(a+2),\dots,P(a+b)\} is fragrant?
Step 4 of 5: Building b=6b=6 with the Chinese Remainder Theorem
In plain words

Choosing aa so that three specific pairs among {a+1,…,a+6}\{a+1,\dots,a+6\} each hit the required residues realizes exactly one gap-22, one gap-33, and one gap-44 coincidence, this time enough to cover all six vertices in a valid pairing.

a+1≡7, a+5≡11 ⁣ ⁣(mod19);a+2≡2, a+4≡4 ⁣ ⁣(mod7);a+3≡1, a+6≡1 ⁣ ⁣(mod3)a{+}1\equiv7,\ a{+}5\equiv11\!\!\pmod{19};\quad a{+}2\equiv2,\ a{+}4\equiv4\!\!\pmod7;\quad a{+}3\equiv1,\ a{+}6\equiv1\!\!\pmod3
Detailed analysis

By the Chinese Remainder Theorem, choose aa (there are infinitely many, by CRT applied to the pairwise coprime moduli 3,7,193,7,19) so that simultaneously a+1≡7(mod19)a+1\equiv7\pmod{19} and a+5≡11(mod19)a+5\equiv11\pmod{19} (making 19∣gcd⁡(P(a+1),P(a+5))19\mid\gcd(P(a+1),P(a+5)), a gap-44 pair), a+2≡2(mod7)a+2\equiv2\pmod7 and a+4≡4(mod7)a+4\equiv4\pmod7 (making 7∣gcd⁡(P(a+2),P(a+4))7\mid\gcd(P(a+2),P(a+4)), a gap-22 pair), and a+3≡1(mod3)a+3\equiv1\pmod3 and a+6≡1(mod3)a+6\equiv1\pmod3 (making 3∣gcd⁡(P(a+3),P(a+6))3\mid\gcd(P(a+3),P(a+6)), a gap-33 pair).