Do the squares of an arithmetic progression ever sum to a power of three?

Can it be shown that

$$\sum_{q=0}^{u}(n+qd)^{2}\ne 3^t \ \ \ \ \forall n,d,u,t\in\mathbb{N}$$

Where we let $\mathbb{N}$ denote positive integers.

I am not confident there is no counterexample.

Edit, My attempted

If $u=4k-1$ then $\sum_{q=0}^{u}(n+qd)^{2}\ne 3^t $

Formula

$$ \sum_{q=0}^{u}(n+qd)^{2} =n^2(u+1)+d(2n+d)\frac{(u+1)u}{2} +d^2\frac{(u+1)u(u-1)}{3} \ \ \ \ \ \ ...eq(1)$$

Proof

Let's suppose

$\sum_{q=0}^{u}(n+qd)^{2}=3^t $

By $eq(1)$ we can write

$2×3^{t+1}=6n^2(u+1)+3d(2n+d)(u+1)u+2d^2(u+1)u(u-1)$

Now consider $u=4k-1$

$\implies 3^{t+1}=12n^2k+6d(2n+d)k(4k-1)+8d^2k(4k-1)(2k-1) $

We know

$12n^2k=even$

$6d(2n+d)k(4k-1)=even$

$8d^2k(4k-1)(2k-1)=even$

And $even +even +even =even\ne 3^{t+1}$

It's show complete proof for $u=4k-1$


Solution 1:

There is no $(n,d,u,t)$ such that $$\sum_{q=0}^{u}(n+qd)^{2}=3^t\tag1$$

Proof :

Suppose that there is $(n,d,u,t)$ satisfying $(1)$ which is equivalent to $$(u+1)\left(6n^2+6ndu+u(2u+1)d^2\right)=2\cdot 3^{t+1}$$

Let us separate it into three cases. Note here that $u+1\gt 1$ and $6n^2+6ndu+u(2u+1)d^2\gt 2$.

  • Case 1 : $(u+1,6n^2+6ndu+u(2u+1)d^2)=(2,3^{t+1})$. Then,$$n^2+(n+d)^2=3^t\tag2$$We see that both $n$ and $n+d$ have to be divisible by $3$, so setting $n=3n_1$ and $n+d=3d_1$ gives$$n_1^2+d_1^2=3^{t-2}\tag3$$Comparing $(3)$ with $(2)$, we see that if $t$ is even, then there are positive integers $N,D$ such that $N^2+D^2=1$ which is impossible. If $t$ is odd, then there are positive integers $N,D$ such that $N^2+D^2=3$ which is impossible.

  • Case 2 : $(u+1,6n^2+6ndu+u(2u+1)d^2)=(2\cdot 3^a,3^b)$ where $a,b$ are positive integers such that $a+b=t+1$. Then,$$6n^2+6nd(2\cdot 3^a-1)+(2\cdot 3^a-1)(4\cdot 3^a-1)d^2=3^b\tag4$$Setting $d=3d_1$ gives$$2n^2+2n\cdot 3d_1(2\cdot 3^a-1)+(2\cdot 3^a-1)(4\cdot 3^a-1)\cdot 3d_1^2=3^{b-1}$$Setting $n=3n_1$ gives$$6n_1^2+6n_1d_1(2\cdot 3^a-1)+(2\cdot 3^a-1)(4\cdot 3^a-1)d_1^2=3^{b-2}\tag5$$Comparing $(5)$ with $(4)$, we see that if $b$ is odd, then there are positive integers $a,N,D$ such that$$6N^2+6ND(2\cdot 3^a-1)+(2\cdot 3^a-1)(4\cdot 3^a-1)D^2=3$$which is impossible since the LHS is larger than $3$. If $b$ is even, then there are positive integers $a,N,D$ such that $$6N^2+6ND(2\cdot 3^a-1)+(2\cdot 3^a-1)(4\cdot 3^a-1)D^2=1$$which is impossible since the LHS is larger than $1$.

  • Case 3 : $(u+1,6n^2+6ndu+u(2u+1)d^2)=(3^a,2\cdot 3^b)$ where $a,b$ are positive integers such that $a+b=t+1$. Then, $$6n^2+6nd(3^a-1)+(3^a-1)(2\cdot 3^a-1)d^2=2\cdot 3^b\tag6$$Setting $d=3d_1$ gives$$2n^2+2n\cdot 3d_1(3^a-1)+(3^a-1)(2\cdot 3^a-1)\cdot 3d_1^2=2\cdot 3^{b-1}$$Setting $n=3n_1$ gives$$6n_1^2+6n_1d_1(3^a-1)+(3^a-1)(2\cdot 3^a-1)d_1^2=2\cdot 3^{b-2}\tag7$$Comparing $(7)$ with $(6)$, we see that if $b$ is odd, then there are positive integers $a,N,D$ such that$$6N^2+6ND(3^a-1)+(3^a-1)(2\cdot 3^a-1)D^2=6$$which is impossible since the LHS is larger than $6$. If $b$ is even, then there are positive integers $a,N,D$ such that $$6N^2+6ND(3^a-1)+(3^a-1)(2\cdot 3^a-1)D^2=2$$which is impossible since the LHS is larger than $2$.

From the three cases above, the conclusion written at the top follows.