# $\sum_{k=1}^n a_k^3 = \left(\sum_{k=1}^n a_k \right)^2$

We know that $\sum_{k=1}^n k^3 = \left(\sum_{k=1}^n k \right)^2$. Interestingly, $1^3+2^3+2^3+4^3=(1+2+2+4)^2$. Are there other non-consecutive numbers $a_1, a_2, \ldots, a_k$ such that $$\sum_{k=1}^n a_k^3 = \left(\sum_{k=1}^n a_k \right)^2?$$

-
There is 2,2,4,4 and the trivial $a_k=n$ for all $k$. – lhf Oct 19 '12 at 2:51

Here is a surprising result: $$\sum_{d\mid n} \tau(d)^3 = \big(\sum_{d\mid n} \tau(d)\big)^2$$ where $\tau$ counts the number of divisors of an integer.

It's exercise 12 in chapter 2 of Apostol's Introduction to Analytic Number Theory.

If you take $n=2^N$, you get the classic result for consecutive numbers.

If you take $n=pq$, a product of two primes, you get your example.

I don't think all examples come from the result above, though.

See John Mason, Generalising 'Sums of Cubes Equal to Squares of Sums', The Mathematical Gazette, Vol. 85, No. 502 (Mar., 2001), pp. 50-58.

-
Thanks a lot! I just saw another reference:David Pagni, 82.27 An Interesting Number Fact, The Mathematical Gazette, Vol. 82, No. 494 (Jul., 1998), pp. 271-273. – pipi Oct 19 '12 at 4:24
@pipi, yes, Mason starts by citing Pagni. – lhf Oct 19 '12 at 12:02

Lots. Here's some examples:

[ 2, 2 ]
[ 3, 3, 3 ]
[ 1, 2, 2, 4 ]
[ 2, 2, 4, 4 ]
[ 4, 4, 4, 4 ]
[ 1, 2, 2, 3, 5 ]
[ 3, 3, 3, 3, 6 ]
[ 3, 3, 3, 4, 6 ]
[ 5, 5, 5, 5, 5 ]
[ 1, 1, 1, 2, 2, 5 ]
[ 1, 1, 1, 4, 4, 5 ]
[ 1, 1, 2, 4, 5, 5 ]
[ 1, 1, 4, 5, 5, 5 ]
[ 1, 2, 2, 3, 4, 6 ]
[ 1, 2, 2, 4, 4, 6 ]
[ 1, 4, 4, 4, 6, 6 ]
[ 2, 2, 2, 2, 2, 6 ]
[ 2, 2, 4, 4, 6, 6 ]
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 7, 7, 10 ]
[ 3, 5, 6, 6, 6, 7, 9, 9 ]
[ 3, 6, 6, 6, 7, 7, 7, 10 ]
[ 3, 6, 7, 7, 7, 8, 8, 9 ]
[ 4, 4, 4, 4, 4, 4, 6, 10 ]
[ 4, 4, 4, 4, 5, 5, 7, 10 ]
[ 4, 4, 4, 4, 8, 8, 8, 8 ]
[ 4, 4, 4, 5, 5, 5, 9, 9 ]
[ 4, 4, 4, 5, 5, 6, 9, 9 ]
[ 4, 4, 5, 5, 5, 7, 9, 9 ]
[ 4, 4, 6, 6, 7, 7, 9, 9 ]
[ 4, 5, 5, 5, 8, 8, 8, 9 ]
[ 4, 5, 5, 6, 6, 7, 8, 10 ]
[ 4, 6, 6, 6, 7, 8, 9, 9 ]
[ 5, 5, 5, 7, 7, 7, 8, 10 ]
[ 5, 5, 7, 7, 7, 8, 9, 9 ]
[ 6, 6, 6, 6, 6, 6, 9, 10 ]
[ 6, 6, 7, 7, 8, 8, 9, 9 ]
[ 6, 6, 8, 8, 8, 8, 8, 9 ]
[ 8, 8, 8, 8, 8, 8, 8, 8 ]


This was generated by the GAP code:

for s in [1..8] do
A:=UnorderedTuples([1..20],s);;
for L in A do
lhs:=Sum(List(L,n->n^3));
rhs:=Sum(L)^2;
if(lhs=rhs and L<>[1..s]) then Print(L,"\n"); fi;
od;
od;

-
Thanks! Is it possible that $$\sum_{k=1}^n a_k^3 = \left(\sum_{k=1}^n a_k \right)^2$$ with some $a_k>n$? – pipi Oct 19 '12 at 4:36
Yes, there's some in the list above, such as [ 3, 3, 3, 3, 6 ] and [ 4, 4, 4, 5, 5, 5, 9 ]. – Douglas S. Stones Oct 19 '12 at 4:48
Oh ya, I did not notice it! Thanks! – pipi Oct 19 '12 at 5:50