document.write( "Question 1195802: What are the three rightmost digits of the sum 1!+2!+3!+...+2020!? \n" ); document.write( "
Algebra.Com's Answer #828330 by greenestamps(13200)\"\" \"About 
You can put this solution on YOUR website!


\n" ); document.write( "The number 5! contains one factor of 5 (and more than one factor of 2), so it has one trailing zero.

\n" ); document.write( "The number 10! contains two factors of 5, so it has two trailing zeros.

\n" ); document.write( "The number 15! contains three factors of 5, so it has three trailing zeros.

\n" ); document.write( "So the only numbers in the given sum that have nonzero digits in the last three places are 1! to 14!. So to find the answer, you only need to find the last three digits of 1! through 14! and add them.

\n" ); document.write( "It might seem as though that is still a difficult problem, because those factorials get very large quickly. But the task is relatively easy, because we are only interested in the last three digits of each factorial.
\r\n" );
document.write( "\r\n" );
document.write( "    n  last 3 digits of n!\r\n" );
document.write( "   ------------------------\r\n" );
document.write( "    1       1\r\n" );
document.write( "    2       2\r\n" );
document.write( "    3       6\r\n" );
document.write( "    4      24\r\n" );
document.write( "    5     120\r\n" );
document.write( "    6     720   (6*120 = 720)\r\n" );
document.write( "    7     040   (7*720 = 5040; but we don't care about the \"5\")\r\n" );
document.write( "    8     320   (8*040 = 320)\r\n" );
document.write( "    9     880   (9*320 = 2880; but we don't care about the \"2\")\r\n" );
document.write( "   10     800   (10*880 = 8800; but we don't care about the first \"8\")\r\n" );
document.write( "\r\n" );
document.write( "After this, since each factorial contains two trailing zeros, we only need to multiply the last digit of n times the last nonzero digit of the previous factorial to find the last nonzero digit of n!.\r\n" );
document.write( "\r\n" );
document.write( "   11     800   (1 (units digit of \"11\"), times 8 (last nonzero digit of 10!))\r\n" );
document.write( "   12     600   (2 times 8)\r\n" );
document.write( "   13     800   (3 times 6)\r\n" );
document.write( "   14     200   (4 times 8)\r\n" );
document.write( "          ---\r\n" );
document.write( "          313   (5313; but we don't care about the \"5\")

\n" ); document.write( "ANSWER: 313

\n" ); document.write( "
\n" ); document.write( "
\n" );