document.write( "Question 1173561: Suppose apples are in the shape of a pyramid. On the top layer, there is 1 apple. On the second layer, there are 1+2 apples. On the third layer, there is 1+2+3 apples. On the fourth layer, there 1+2+3+4 apples. If there are N number of layers, how many apples are there in total? \n" ); document.write( "
Algebra.Com's Answer #798799 by ikleyn(52788)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "
\r\n" );
document.write( "\r\n" );
document.write( "The number of balls in the k-th layer from the top is  \"%28k%2A%28k%2B1%29%29%2F2\", k = 1, 2, 3, . . . , n.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The number of balls in the entire triangle pyramid of n layers is  \"%28n%2A%28n%2B1%29%2A%28n%2B2%29%29%2F6\".    ANSWER\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "This formula can be easily proved by the method of Mathematical induction.\r\n" );
document.write( "
\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "For more details, see this link\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "https://math.stackexchange.com/questions/1148720/finding-the-formula-for-the-number-of-golf-balls-in-a-triangular-pyramid-with-n\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "/\/\/\/\/\/\/\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Be aware (!)\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "1)   The formula in the post by @Boreal is INCORRECT (!)\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "2)   The formula in the post by  @ewatrrr     \"sum%28%28N%5Bi%5D%28N%5Bi%5D-1%29%2F2%29%2C+i=1%2C+N%29%29\"       is incorrect,  too  (!)\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "      The correct writing is  THIS     \"sum%28+%28i%28i%2B1%29%2F2%29%2C+i=1%2C+N%29%29\",\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "      and it gives that final compact formula as presented in my post.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( ". . . . . . . . \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "@ewatrrr fixed her post after seeing my solution.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );