-1

Find all positive integers n such that $n^2+1$ is divisible by $n+1$.

I've seen the answers here, but am none the wiser. The source gives

There is only one such positive integer: $n = 1$.

In fact, $n^2+1 = n(n+1)-(n-1)$;

Thus, if $n+1 \mid n^2+1$, then $n+1 \mid n-1$ which for positive integer $n$ is possible only if $n-1 = 0$, hence if $n = 1$.

My difficulties are:

  • How would I come up with $n^2+1 = n(n+1)-(n-1)$ if someone didn't point it out?
  • How do I know that if $n+1 \mid n^2+1$, then $n+1 \mid n-1$?
  • How do I know that this is possible only if $n-1 = 0$?

I'm at a stage where I need a bit more verbosity. Any help much appreciated.

  • First $\bullet$: $n^2+1=n^2+n-n+1$ is not so hard to guess. – Dietrich Burde Jul 27 '21 at 14:37
  • 1
    Note that $n+1$ always divides $n^2-1$ so if it also divides $n^2+1$ then it divides $2$. – lulu Jul 27 '21 at 14:37
  • Yeah, that seems an overly complicated solution. Not wrong, just not as simple as it could be. If $a$ divides $b$ and $c$ then $a$ divides $b+c$ and $b-c.$ – Thomas Andrews Jul 27 '21 at 14:41
  • The answers at the link all show $n+1$ divides $2$, not (just) $n-1$. – Barry Cipra Jul 27 '21 at 14:45
  • 1
    "$n^2+1=n^2+n−n+1$" is not so hard to guess. I disagree. With hindsight it is obvious for sure... – Robin Andrews Jul 27 '21 at 15:10
  • 1
    Adding and subtracting a common term to an expression, or its equivalent, adding a common term to two sides of an equation, is a frequently used trick to recast expressions into more suitable forms for analysis. You'll come across it when you study completing the square to solve quadratics. Once you're more familiar with it, it will come to seem obvious to you also. – Keith Backman Jul 27 '21 at 15:45
  • 1
    One "comes up" with that by polynomial division, i.e. dividing $,p(n) = n^2+1,$ by $,n+1,$ yields $,p(n) = (n+1) q(n) + r,,$ where $,r = p(-1) = 2,,$ by the Polynomial Remainder Theorem - see my answer in the linked dupe for details. – Bill Dubuque Jul 27 '21 at 15:57
  • @KeithBackman thanks, that's helpful to know. – Robin Andrews Jul 27 '21 at 17:36

1 Answers1

0

The technique you are looking for is polynomial division.

We attack the highest degree term first because we want to reduce to a simpler problem.

Here we want to divide $n^2+1$ by $n+1$. Looking at the highest term we see we wasn't to eliminate the $n^2$ term, so we need to multiply $n+1$ by something that gives us an $n^2$ term. The obvious candidate is $n$, because $n(n+1)=n^2+n = n^2+1+n-1$ so that $$n^2+1=n(n+1)-n+1$$

The remainder here is $-n+1$ which has the same degree as $n+1$, so we can reduce further. To get a $-n$ term we need to multiply $n+1$ by $-1$ so that $(-1)\cdot(n+1)=-n-1=-n+1-2$ and $$-n+1=(-1)\cdot (n+1)+2$$ whence $$n^2+1=n(n+1)-n+1=n(n+1)+(-1)(n+1)+2=(n-1)(n+1)+2$$

Note that, provided the coefficients of the polynomial are not limited (so if rational numbers are allowed), we can divide a polynomial $f(x)$ by $p(x)$ to give $$f(x)=p(x)q(x)+r(x)$$ where $r(x)$ has a lower degree than $p(x)$

The comment about the limitation on coefficients is illustrated by the fact that you can't even divide $x^2$ by $2x$ if you don't have $\frac 12$ available. In your example the divisor $n+1$ has leading coefficient $1$ (we say it is monic), and therefore there is no need to divide by any integer other than $1$, and this works fine with integer coefficients.

As others have observed this is quite a simple problem and can almost be solved by observation if you know what you are looking for. But the polynomial division method will serve for more complicated examples of the same type.

Mark Bennet
  • 100,194