Sum of Positive n < 100 Where 91 Divides n^2 + 2n + 15

Board: Olympiad | Grade: Olympiad | Chapter: Modular Arithmetic

Problem

Find the sum of all positive integers $n < 100$ such that $n^2 + 2n + 15$ is divisible by $91$.

Step-by-Step Textbook Solution

Since $91 = 7 \times 13$ and $\gcd(7, 13) = 1$, $91 \mid (n^2 + 2n + 15)$ if and only if both $7$ and $13$ divide $n^2 + 2n + 15$.

Complete the square: $$n^2 + 2n + 15 = (n + 1)^2 + 14.$$

  1. Modulo $7$: $$(n + 1)^2 + 14 \equiv (n + 1)^2 \equiv 0 \pmod 7 \implies n + 1 \equiv 0 \pmod 7 \implies n \equiv 6 \pmod 7.$$

  2. Modulo $13$: $$(n + 1)^2 + 14 \equiv (n + 1)^2 + 1 \equiv 0 \pmod{13} \implies (n + 1)^2 \equiv -1 \equiv 25 \pmod{13}.$$ Since $13$ is prime, this gives two roots modulo $13$: $$n + 1 \equiv \pm 5 \pmod{13} \implies n \equiv 4 \pmod{13} \quad \text{or} \quad n \equiv 7 \pmod{13}.$$

Now solve the two resulting CRT systems modulo $91$:

  • Case 1: $n \equiv 6 \pmod 7$ and $n \equiv 4 \pmod{13}$. Write $n = 13k + 4$. Then $13k + 4 \equiv -k + 4 \equiv 6 \pmod 7 \implies k \equiv -2 \equiv 5 \pmod 7$. Thus $n = 13(5) + 4 = 69 \pmod{91}$.
  • Case 2: $n \equiv 6 \pmod 7$ and $n \equiv 7 \pmod{13}$. Write $n = 13k + 7$. Then $13k + 7 \equiv -k \equiv 6 \pmod 7 \implies k \equiv 1 \pmod 7$. Thus $n = 13(1) + 7 = 20 \pmod{91}$.

Since $20 + 91 = 111 > 100$ and $69 + 91 = 160 > 100$, the only positive integers $n < 100$ are $n = 20$ and $n = 69$. (Check: $20^2+40+15 = 455 = 5 \times 91$, and $69^2+138+15 = 4914 = 54 \times 91$.)

Their sum is $20 + 69 =$ $89$.

NityaDhi Solution (Intuitive Method)

Use Completed-Square CRT Pairing: Notice that $n_1 = 20$ and $n_2 = 69$ satisfy $(n_1 + 1) + (n_2 + 1) \equiv 0 \pmod{91}$, because both roots $\pm 5 \pmod{13}$ have sum $0$ and the repeated root $0 \pmod 7$ has sum $0$! Wait—that means without even solving CRT for both roots separately, once you verify both solutions lie in $[1, 90]$ (here $n \equiv 6 \pmod 7$ and $n+1 \equiv \pm 5 \pmod{13}$ give two distinct residues in $[0, 90]$, neither equal to $0$ since $0^2+2(0)+15 = 15 \not\equiv 0 \pmod{91}$), their sum modulo $91$ is: $$(n_1 + 1) + (n_2 + 1) \equiv 0 \pmod{91} \implies n_1 + n_2 \equiv -2 \equiv 89 \pmod{91}.$$ Since $n_1, n_2 \in [1, 90]$ and $n_1 \not\equiv n_2$, their exact sum is either $89$ or $89 + 91 = 180$—Wait: $n \equiv 6 \pmod 7$ means $n_1, n_2 \in {6, 13, 20, \dots, 90}$, and $n_1 + n_2$ is small ($20 + 69 = 89$ since $n_1$ or $n_2$ is $\le 45$)! Checking $n_1 = 20$ gives $n_2 = 89 - 20 = 69$ immediately!

Common Mistakes to Avoid

  • Stopping after finding only $n = 20$: Modulo a composite $91 = 7 \times 13$, a quadratic congruence can have up to $2 \times 2 = 4$ roots (here $1 \times 2 = 2$ roots because $\bmod 7$ has a double root).
  • Testing $(n+1)^2 \equiv -1 \pmod{13}$ and concluding "no solution": Over $\mathbb{R}$, squares cannot be negative, but modulo $13 \equiv 1 \pmod 4$, $-1 \equiv 25 = 5^2$ IS a quadratic residue!