3

How does one prove that $f(n) = n^2 +5n + 16$ is not divisible by $169$ for any integer $n$?

THOUGHTS:

This is equivalent to say that $$ n^2 +5n + 16=0\pmod{169} $$ has no solutions. One can also observe that $169=13^2$. And of course one cannot expect to prove this case by case since $\mathbb{Z}$ is not a finite set. But I really don't know how to proceed from here. Can any one help?

Bill Dubuque
  • 282,220
  • It probably helps that $169=13^2$ – G Tony Jacobs Oct 15 '19 at 19:20
  • 3
    The only root mod $13$ is $4$, so you only have to check a few values $\pmod {169}$. – lulu Oct 15 '19 at 19:21
  • 1
    "And of course one cannot expect to prove this case by case since Z is not a finite set" but as $\mathbb Z \mod 169$ *is* one most certainly can. If $n$ is a solution than so is any $m \equiv n \pmod {169}$ so you can test them out one by one. (Not that I recommend it but you can "of course" expect to prove it case by case) – fleablood May 20 '25 at 21:45

5 Answers5

12

This is one of my favorite elementary number theory problems.

Hint: $$f(n)=n^2+5n+16=(n^2+5n-36)+52$$


$f(n)=(n+9)(n-4)+52$. Assume that there is some $n$ such that $13\mid f(n)$. Then $13\mid n+9$ or $13\mid n-4$. But if one of those is true, then the other is as well, since $9\equiv-4\pmod{13}$. In other words, if $13\mid f(n)$ then $169\mid n^2+5n-36$. But if this is true, then $f(n)\equiv52\pmod{169}$.

  • 2
    I don't understand this hint – nonuser Oct 15 '19 at 19:25
  • 1
    @Aqua You can factor the quadratic expression. Then show that if the entire expression is divisible by 13, then it cannot be divisible by 169. –  Oct 15 '19 at 19:27
  • 4
    $(n+9)(n-4)+52$. So, $13\mid(n+9)(n-4)$, which means that $13|n+9$ or $13|n-4$. But if it divides either, it divides both, so $169\mid n^2+5n-36$, a contradiction. – Rushabh Mehta Oct 15 '19 at 19:27
11

Suppose it is, then also $$13\mid n^2+5n+16$$ so $$13\mid (n^2+5n+16)-13n=n^2-8n+16$$

so $$ 13\mid n-4\implies 169\mid (n-4)^2 = n^2-8n+16$$

So $$169 \mid (n^2+5n+16)-(n^2-8n+16)= 13n\implies 13\mid n$$ But then from 1.st relation we get $$13\mid 16$$ a contradiction!

nonuser
  • 91,557
  • Wow, that's cute. – Rushabh Mehta Oct 15 '19 at 19:24
  • @Don Actually we can prove much more just as simply - see my answer. – Bill Dubuque Oct 16 '19 at 01:30
  • +1 because $n^2+5n+16=n^2-2\cdot4n+4^2+13n=(n-4)^2+13n$ is, thanks to $16=4^2$, surely easier to spot than $n^2+5n+16=n^2+5n-36+52=(n+9)(n-4)+52$. The question is bad, because getting the answer entails a trick that can't be derived, but can only be seen if you have the luck to make the correct mental leap. The easier the leap, the better. – Rosie F Apr 28 '21 at 13:20
2

Let's try to complete the square. Equivalences below are $\bmod 169$.

$x^2+5x+16\equiv 0$

$4x^2+20x+64\equiv 0$

$4x^2+20x+25=(2x+5)^2\equiv 25-64=-39$

We need to find a quantity whose square is $\equiv -39$. Unfortunately this is a multiple of $13$ and the only square multiples of $13$ are also multiples of $169$ --therefore $\equiv 0\not\equiv -39$. And we're having a bad day.

Oscar Lanzi
  • 48,208
1

$f(n)= \overbrace{(n\!-\!4)^2+13\cdot \color{c00}n}^{\textstyle a^2\ +\,\ p\cdot \color{c00}b\!\!\!\!\!\!\!\!\!\!\!}\,$ $\overset{\rm \color{darkorange}L}\Longrightarrow 13^2\mid f(n)\!\iff\! 13\mid n\!-\!4,\,\color{c00}n\!\iff\! \color{#0a0}{13\mid 4},n$

Lemma $\rm \color{darkorange}L\ \ $ If $\,p\,$ is $\rm\color{#c00}{prime}$ then $\,p^2\,|\, a^2\!+pb\!\iff\! p\,|\, a,b $

Proof $\ \ \ (\Leftarrow)\ $ Obvious. $\, \ \ (\Rightarrow)\ $ $\,\ p^2\,|\, a^2\! + pb\Rightarrow p\,|\, a^2\color{#c00}{\Rightarrow} p\,|\, a$ $\Rightarrow p^2\,|\, a^2\Rightarrow p^2\,|\,pb\Rightarrow p\,|\, b$

Generally the Lemma also holds true for for ${\rm\color{#c00}{squarefree}}\,p\,$ since they are precisely those integers that satisfy the above middle inference, namely $\ p\mid a^2\color{#c00}\Rightarrow\,p\mid a,\,$ for all integers $\,a.$

Bill Dubuque
  • 282,220
-1

Let $n\in \Bbb Z$ be so that $n^2+5n+16$ is divisible by $13$. Then working modulo $13$ we have $$ \begin{aligned} n^2+5n+16 &\equiv n^2 + 18n + 81 \\ &= (n+9)^2 \qquad\text{ modulo }13\ . \end{aligned} $$ So $n$ is of the form $n=4+13k$, we substitute and get (computation in $\Bbb Z$): $$ \begin{aligned} n^2+5n+16 &= (13k +4)^2 + 5(13k+4) + 16 \\ &= 169k^2+169k+52\ . \end{aligned} $$ This is $52$ modulo $13^2$.

dan_fulea
  • 37,952