1

For a given sequence $\frac{n^2+k^2}{2n+1}$ where $k$ is a given integer and $k > 0$, is there a way to calculate how many entries will be of integer value. Or, if that is not possible, know if it will ever be of integer value after a certain point.

For example:

The sequence $\frac{n^2+16}{2n+1}$ is of integer value for $n=2$ as well as for $n=32$. Is there a way of knowing for certain that $n=32$ is the last entry of integer value?

t1sk3
  • 47
  • 3
  • You concentrate on divergent series, isn't it ? – Jean Marie Dec 29 '22 at 11:10
  • 1
    Simplify using polynomial division first... – Adam Rubinson Dec 29 '22 at 11:16
  • The example above would simplify to $\frac{n}{2}-\frac{1}{4}+\frac{65}{4(2n+1)}$. How would you proceed from there? – t1sk3 Dec 29 '22 at 11:22
  • 2
    So for $\frac14( 2n-1+\frac{65}{2n+1})$ to be integer, it is necessary (but not sufficient) for $2n+1$ to divide $65=5\cdot 13$. This leaves only 8 cases to check: $2n+1 \in {-65,-13,-5,-1,1,5,13,65}$. – Jaap Scherphuis Dec 29 '22 at 12:30
  • It's easy to show $,2n+1\mid n^2+k^2\iff 2n+1\mid 1+4k^2,$ (proof is a dupe). What more do you seek? – Bill Dubuque Dec 29 '22 at 18:40
  • I couldn't understand the last comment, because providing directly $\iff$ without justification seems not ok. Even simple, OP was asking here as he/she didn't know about it anyway. – lone student Dec 29 '22 at 19:06
  • @lonestudent It's not clear what you don't understand. Are you asking how to prove the equivalence? Btw, you need to write @ if you wish for a user to be notified by your cmment. Only by chance did I see your comment. – Bill Dubuque Dec 29 '22 at 19:10
  • The same methods in the linked dupe show $,2n+1\mid n^2+k^2\iff 2n+1\mid 1+4k^2,$ so the solutions are $n=(d-1)/2$ where $,d = 2n+1,$ ranges over all odd divisors of $,1+4k^2\ \ $ – Bill Dubuque Dec 29 '22 at 21:09

2 Answers2

2

The exact algebraic answer is:

$$n\equiv \frac {p-1}{2}$$ where, $\thinspace p\mid 4k^2+1\thinspace .$

Here, I have no knowledge that the number of all the factors of $4k^2+1$ can be found by an algebraic formula that depends on $k\thinspace .$


To get the general solution to the problem, we usually apply (as far as I know) $2$ methods: subtracting a polynomial from a fractional expression that makes the numerator a constant and the Discriminant method. Both methods yield the same result. I prefer the $\Delta$ method.

You have:

$$\begin{align}&\frac{n^2 + k^2}{2n+1}=m, \thinspace m\in\mathbb Z\\ \implies &n^2-2nm+(k^2-m)=0 \\ \implies &\Delta_n=4m^2-4k^2+4m\\ &\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace=(2m+1)^2-(4k^2+1)\\ &\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace=x^2, \thinspace x\in\mathbb Z\thinspace.\end{align}$$

This leads to the factorization:

$$(2m-x+1)(2m+x+1)=4k^2+1$$

Since the polynomial is symmetric with respect to the sign of $x$, without loss of generality, we have:

$$n=\frac{2m-x}{2}\implies x=2m-2n$$

This yields, unique factorization in terms of $m$ and $n\thinspace :$

$$\bbox[5px,border:2px solid #C0A000]{\begin{align}(2n+1)(4m-2n+1)=4k^2+1\end{align}}$$

We observe that, the number of pairs $(m,n)$ will vary depending on what the odd factors of $4k^2+1$ are.

Let $p=2n+1$ be a possible factor of $4k^2+1\thinspace.$

Then we have:

$$\begin{align}&p(4m-p+2)=4k^2+1\\ \implies &2m+1=\frac {4k^2+p^2+1}{2p}\end{align}$$

Since, $p$ is odd and $2p\mid 4k^2+p^2+1$, this implies that we need only the restriction $4\not\mid 4k^2+p^2+1\thinspace .$

Thus, we obtain the necessary and sufficient condition: $p\mid 4k^2+1\thinspace.$

Finally, we can write a closed-form formula for $n$, that includes all possible numbers:

$$n\equiv \frac {p-1}{2}$$

where, $\thinspace p\mid 4k^2+1\thinspace .$

This completes the answer.

lone student
  • 14,709
0

I don't have an answer, but here are my thoughts. Let $p$ be an integer entry in the sequence, $$p = \frac{n^2 + k^2}{2n+1}$$

We can then rearrange to form a quadratic equation for $n$, for given $k,p$ $$n^2 + k^2 = p(2n+1)$$ $$n^2 - 2pn + (k^2 - p) = 0$$

For there to be solutions, the discriminant should be non-negative. But moreover, since $n$ is also integer, the discriminant should also be a perfect square, giving $$ p^2 - k^2 + p = q^2 $$

So for any $k$, there must exist integers $p,q$ satisfying the above equation for integer terms in the sequence. If you can determine the integer combinations of $p,q$ that satisfy above, that should tell how many integer terms there are in the original sequence and what terms they are.

Tony Mathew
  • 2,086