2
$\begingroup$

When watching a gaming video, I noticed an intriguing fact:

$$ 1 \times 1 + 2 \times 2 + 3 \times 4 + 4 \times 8 = 49, $$

which is a square number.

I asked myself, is this a coincidence or not? Specifically, is $g(k):=\sum_{i=0}^k(i+1)2^i$ a square only for $k=0,3$? Numerical experiments up to $k=65928$ suggests that this is the case. How can I prove this?

A solution, or a source, or an idea why this might be hard, are all welcome.

The inspiration can be found early in this video (timestamp 0:22 - 0:33).

$\endgroup$
2
  • $\begingroup$ Someone deleted an upvoted answer with a hint of differentiating $\frac{x^{n+2}-x}{x-1}$. Thank you for that. I used it to find the closed form of $g(n) = n2^{n+1}+1$. $\endgroup$ Commented Nov 23, 2023 at 3:28
  • 1
    $\begingroup$ You can select my answer (after a while) if you think it is worth it. $\endgroup$ Commented Nov 23, 2023 at 3:31

3 Answers 3

2
$\begingroup$

Yes, $k = 0, 3$ are the only values $k$ that give squares.

Hint The summands form an arithmetico-geometric sequence and so the sum can be written in closed form as $$g(k) := \sum_{i = 0}^k (i + 1) 2^i = 2^{k + 1} k + 1$$ (see OEIS A000337). We are thus looking for solutions $(n, k)$ in nonnegative integers of the closed-form equation $$2^{k + 1} k + 1 = n^2 .$$ Since the left-hand side is odd, $n$ must be also odd, say, $n = 2 m + 1$ for some integer $m$, and substituting and rearranging gives the equation $$2^{k - 1} k = (m + 1) m .$$

Additional hint One of $m, m + 1$ is odd, so $2^{k - 1}$ divides $m$ or $2^{k - 1}$ divides $m + 1$. In each case we can quickly deduce that $k \leq 3$.

$\endgroup$
2
$\begingroup$

HINT

I would start with noticing that

\begin{align*} f(x) = \sum_{k=0}^{n}x^{k} = 1 + x + x^{2} + \ldots + x^{n} = \frac{x^{n + 1} - 1}{x - 1} \end{align*}

Consequently, one has that: \begin{align*} [xf(x)]' = \sum_{k=0}^{n}(k + 1)x^{k} = 1 + 2x + 3x^{2} + \ldots + (n + 1)x^{n} = \frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{x^{n + 2} - x}{x - 1}\right) \end{align*}

Based on it, can you proceed from here?

$\endgroup$
2
  • $\begingroup$ Thanks. I evaluated the derivative at $x=2$ to get the closed form. $\endgroup$ Commented Nov 23, 2023 at 3:38
  • $\begingroup$ @BenjaminWang you are welcome! I am glad to help. $\endgroup$ Commented Nov 23, 2023 at 3:39
1
$\begingroup$

For $a_n=(an+b)q^{n-1}$, there is a formula saying $\sum_{i=1}^n a_n=(A_n+B)q^n-B$, where \begin{align*} &A=\frac{a}{q-1}&B=\frac{b-A}{q-1}.& \end{align*} In your case, $a_n=(2n+2)2^{n-1},$ so $\sum_{i=0}^n=(2n)2^n+1,$ which is an odd number. We try to find $k$ such that $$(2n)2^n+1=(2k+1)^2,$$ i.e., $$n2^{n-1}=k(k+1).$$ If $k$ is odd, we must have $n=k$, while if $k$ is even, we must have $n=k+1.$ Then by solving $n2^{n-1}=n(n+1)$ or $n2^{n-1}=(n-1)n$ you can find out that $n=0$ and $n=3$ are the only solutions.

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .