Perl Monk, Perl Meditation  
PerlMonks 
Re: Triangle Numbersby Jobby (Monk) 
on Jul 26, 2002 at 01:36 UTC ( #185395=note: print w/ replies, xml )  Need Help?? 
Incidentally, the formula for the nth triangular number is actually 1/2*n*(n+1) rather than the 5*n*(n+1) given above. Now we *can* prove that the sum of two consecutive triangular numbers is a square number: 1/2*n*(n+1) + 1/2*(n+1)*(n+2)=1/2*(n+1)*(2n+2) =(n+1)^2 Thought I was going nuts for a second there :)
In Section
Cool Uses for Perl

