# [seqfan] Re: a question about triangular numbers

Max Alekseyev maxale at gmail.com
Tue Dec 8 19:31:48 CET 2009

```On Tue, Dec 8, 2009 at 12:34 PM, Tanya Khovanova
<mathoflove-seqfan at yahoo.com> wrote:
> Every number can be represented as a sum of three triangular numbers.
>
> I need to know the following sequence: a(n) is the largest possible triangular number when n is represented as a sum of three triangular numbers.

If I understood you correctly, it should be:
a(n) is the largest possible triangular number in the decomposition of
n into the sum of three triangular numbers.

> The sequence should start 1, 1, 3, 3, 3, 6, 6, 6, 6, which coincides with http://www.research.att.com/~njas/sequences/A057944
>
> Are they the same? Does anyone know a formula?

No, they are not the same.
Here are the first 100 terms of your sequence:

1, 1, 3, 3, 3, 6, 6, 6, 6, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15, 10,
21, 21, 21, 21, 21, 15, 21, 28, 28, 28, 28, 28, 21, 28, 28, 36, 36,
36, 36, 36, 28, 36, 36, 28, 45, 45, 45, 45, 45, 28, 45, 45, 28, 45,
55, 55, 55, 55, 55, 45, 55, 55, 45, 55, 55, 66, 66, 66, 66, 66, 55,
66, 66, 45, 66, 66, 66, 78, 78, 78, 78, 78, 55, 78, 78, 66, 78, 78,
78, 78, 91, 91, 91, 91, 91, 78, 91, 91, 78, 91

The first disagreement with A057944 is at a(20)=10.

Regards,
Max

```