Fun With Sums


It’s been a while since there has been any math on the blog, so I figured I’d share a recent (trivial) mathematical fact I came upon while passing the time. A less noble goal is that I hope some of you will find it interesting enough to think about it for a while. In other words, I’m too lazy to keep working on it but I hope some others will fall into my trap and let me know the answer.

Several nights ago, a friend of mine was procrastinating on the Internet — something I hear people do from time to time. He chanced upon a random (nerdy) web comic where the author declared that

10^2+11^2 + 12^2 = 13^2 + 14^2.

I think basically everyone knows the Pythagorean triple

3^2 + 4^2 = 5^2,

but I had never come across (or wondered privately) whether the pattern continued. A small group of us got together to determine an answer. Indeed, one can find m consecutive integers whose squares add up to the sum of the next m-1 squares. For example,

21^2+22^2+23^2+24^2 = 25^2 + 26^2 + 27^2

36^2+37^2+38^2+39^2+40^2 = 41^2 + 42^2 + 43^2 + 44^2

In general, the problem is to find k which solves the equation


Of course k must depend on m. Solving this equation is pretty simple using the following identities:

\sum_{i=0}^m i=\frac{1}{2}m(m+1)

\sum_{i=0}^m i^2=\frac{1}{6}m(2m+1)(m+1)

Using these identities correctly in our equation produces the polynomial


Plugging in k=\alpha m produces

m^2(m+1)(\alpha -2m-1)=0

which forces the choice \alpha=2m+1, i.e. k=m(2m+1). So, indeed, we can find a sequence of 2m+1 consecutive integers so that the squares of the first m+1 of them add up to the sum of the squares of the last m.

Now, it’s also true that


It is an exercise left to the reader to figure out the general pattern for cubes, if it exists, and then generalize. Homework is due next week.

20 Responses to “Fun With Sums”

  1. Carl Says:


  2. Aaron F. Says:

    Oooooh, cool!

  3. Jerrell Says:

    Just dropping by.Btw, you website have great content!

    Professionally Written And Inspirational Wedding Speeches And Toasts…

  4. Qiaochu Yuan Says:

    Unfortunately, there’s no solution to i^3 + (i+1)^3 + (i+2)^3 + (i+3)^3 = (i+4)^3 + (i+5)^3 in integers; the polynomial is irreducible. This remains true if we add an extra term on the LHS. I think we should only expect finitely many such cubic identities; the resulting Diophantine in k and m probably has genus 1.

  5. Luis Says:

    No link to ?

    • Jessie Says:

      Good Lord, I bet my list is way too louhiSnsg., my Blackberry, my iPod, and Trader Joe’s Organic Dark Chocolate Caramels. OMG.Amen to the Bible. Amen!

    • baufinanzierung Says:

      dopo un paio di giorni di notizie di questi resti, ritrovamenti e certezze / opinioni sulle cause derivate da questi pezzi ritrovati, tipo può essere esploso perchè sono sparsi……ecco oggi si legge:DISASTRO AEREO: RESTI IN MARE NON SONO DELL'AIRBUS

    • Says:

      conexaoparis disse:MartaPara meus roteiros pegue metro até o ponto inicial. Senã terá que andar muito.Evento de Moda: estou sem saber. Vou dar uma investigada.

  6. Vineet Says:

    How do you ascertain that m|k ?

  7. Combinations and Permutations Says:

    I know that this is off topic but I am host of a mathematics podcast
    and Permutations
    that I think that your readership may find
    interesting. On the last episode we have covered the four color theorem and some new ideas for mathematical journals. You can find the podcast on iTunes or through our host. Give us a listen, you
    will not be disappointed

  8. Peter Says:

    That link to abstruse goose was actually what started this thing. I was reading the whole archive of it in an attempt to avoid work, saw that formula, and then succeeded in avoiding more work by working on it. The other Peter and I were talking about it for a bit, and afterwards we both came up with this answer.

  9. Peter Luthy Says:

    Qiaochu, I was allowing that the pattern no longer had to be anything like the original. For instance, perhaps one cannot guarantee that all the terms will be consecutive — i.e. maybe the cubes on the left and right sides of the equation may be separated by some large gap. Also the number of terms on each side might not be linearly related any longer.

    And thanks for the link Peter. I wasn’t sure what comic it was that started the whole discussion in the first place.

  10. Peter Luthy Says:


    There are quite a few arguments for why we know that k is what it is. I simply made a quick guess when I was working on the problem and it turned out to be correct. But here is an answer that might be more to your satisfaction: note that k^2-m^2-2m^3-2km^2=0 is a quadratic polynomial in k where the coefficients are a=1, b=-2m^2, and c=-m^2-2m^3. Applying the quadratic formula (and applying some algebra), one arrives with two solutions, the one derived in the post, and k=-m which we don’t really want to consider anyway — it is silly because the terms squared in each sum will end up being symmetric around zero.

  11. Vineet Says:

    Yeah, got it. k = m(m+2), and hence k=(alpha)m.
    I actually wrote my query wrong, I meant m|k.


  12. Academic Career Links Says:

    Nice post!

  13. Let’s Read the Internet! week 10 « Arcsecond Says:

    […] Fun With Sums Peter Luthy at The Everything Seminar […]

  14. Bunny Doherty Says:

    Hi Peter,

  15. Delores Says:

    Arelcits like this make life so much simpler.

  16. moda Says:

    Greetings! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in trading links or maybe guest authoring a blog article
    or vice-versa? My site goes over a lot of the same subjects
    as yours and I believe we could greatly benefit from each other.
    If you’re interested feel free to shoot me an email.
    I look forward to hearing from you! Wonderful blog
    by the way!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: