document.write( "Question 1196433: How many numbers between 10 and 1000 have a digit sum of 8?
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #829260 by ikleyn(52790)\"\" \"About 
You can put this solution on YOUR website!
.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The meaning of the word  \" between \"  in  Math problems is not precisely defined.\r
\n" ); document.write( "\n" ); document.write( "Every time you should explain,  if endpoints are included or not.\r
\n" ); document.write( "\n" ); document.write( "So,  I will re-formulate the problem in this form\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "    +---------------------------------------------------------------------+\r\n" );
document.write( "    |   How many numbers from 10 to 999 inclusive have a digit sum of 8?  |\r\n" );
document.write( "    +---------------------------------------------------------------------+\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "                                Solution\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "For a minute, I will change my problem and ask\r\n" );
document.write( "\r\n" );
document.write( "    +-----------------------------------------------------------------------+\r\n" );
document.write( "    |   How many numbers from 0 to 999 inclusive have a digit sum of 8?    |\r\n" );
document.write( "    +-----------------------------------------------------------------------+\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Then it is the same as to ask\r\n" );
document.write( "\r\n" );
document.write( "   \r\n" );
document.write( "    How many integer solutions does this equation have \r\n" );
document.write( "\r\n" );
document.write( "        \"x%5B1%5D\" + \"x%5B2%5D\" + \"x%5B3%5D\" = 8\r\n" );
document.write( "\r\n" );
document.write( "    in integer non-negative numbers  \"x%5B1%5D\" >= 0,  \"x%5B2%5D\" >= 0,  \"x%5B3%5D\" >= 0 ?\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The answer is known from Combinatorics ( \" Stars and Bars method \" ),\r\n" );
document.write( "\r\n" );
document.write( "( see this Wikipedia article  \r\n" );
document.write( "\r\n" );
document.write( "https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)#:~:text=In%20the%20context%20of%20combinatorial,his%20classic%20book%20on%20probability. )\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The number of solution in this case is  \"C%5B8%2B3-1%5D%5E%283-1%29\" = \"C%5B10%5D%5E2\" = \"%2810%2A9%29%2F2\" = 45.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "From it, we should subtract 1, which represents the number \"8\",\r\n" );
document.write( "(we included it, when extended the set from [10,999] to [0,999]).\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "After subtracting, we get the final \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "ANSWER.  There are 45-1 = 44  integer numbers from 10 to 999 (inclusive), such that the sum of their digits is 8.\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "Solved.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );