in reply to Re: Triangle Numbers
in thread Triangle Numbers

Good ideas particle, glad to see'em. This algorithm generates a sum of triangle numbers, but not necessarily a sum of _three_ triangle numbers. According to this, 26=21+3+1+1. But whole numbers can all be written as a sum of three tnums, 26=1+10+15. I think it would take some ugly backtracking to get yours to conform. Or else something clever.

Update: Particle, that does it, real slick, not sure why I thought it would have to get ugly. I like it!

YuckFoo

Replies are listed 'Best First'.
Re^3: Triangle Numbers
by particle (Vicar) on Apr 24, 2002 at 19:48 UTC
    This algorithm generates a sum of triangle numbers, but not necessarily a sum of _three_ triangle numbers
    EGAD! you're right. i've fixed it to generate a list of three or less (i think.) if you want precisely three, i'll have to do a little more thinking.

    Update: unless of course zero is valid. i can't see how it's not, because 1 must be 1, 0, 0. so i'll update my code (once more) to reflect that.

    ~Particle ;Þ

      1001, 0000, 0000, 1001 are the first four lines of my "God's Zone Of Zero" in Christmatics. Are you aware that every other triangle number plotted on a square grid seems to produce two straight and parallel lines on that grid? Those two straight parallel lines pass through the zone of zero in such a way that what Christmatics is calling "Joseph's stick" becomes "Judah's stick" when that line has passed through "God's Zone Of Zero". If this interests you, do a search for "Ezekiel's Two Sticks" and "Christmatics" on the web for more of my thoughts. Waldo
        The 12th prime # is 37 while the 21st prime # is 73. Did you know that the multiplication of the 12 times the 21st prime equals 2701 which is the same as the gematria of the first seven words of the Hebrew Torah? Well, you may have this as clue! Jesus spoke, and that is the BIG BANG! Waldo