document.write( "Question 1158401: Find how many distinct numbers greater than 5000 and divisible by 3 can be formed from the digits 3,4,5,6 and 0, if each digit is used atmost once in a number? \n" ); document.write( "
Algebra.Com's Answer #781425 by Edwin McCravy(20055)\"\" \"About 
You can put this solution on YOUR website!
Find how many distinct numbers greater than 5000 and divisible by 3 can be
\n" ); document.write( "formed from the digits 3,4,5,6 and 0, if each digit is used atmost once in a
\n" ); document.write( "number?
\n" ); document.write( "
\r\n" );
document.write( "For an integer to be divisible by 3, the sum of its digits must be divisible by\r\n" );
document.write( "3.\r\n" );
document.write( "\r\n" );
document.write( "Case 1.  The number has 5 digits.  \r\n" );
document.write( "\r\n" );
document.write( "Then it will be divisible by 3 because 3+4+5+6+0=18, which is divisible by 3.\r\n" );
document.write( "\r\n" );
document.write( "All 5 digit numbers are greater than 5000, so\r\n" );
document.write( "\r\n" );
document.write( "We choose the 1st digit 4 ways. (The first digit cannot be 0)\r\n" );
document.write( "We choose the 2nd digit 4 ways.\r\n" );
document.write( "We choose the 3rd digit 3 ways.\r\n" );
document.write( "We choose the 4th digit 2 ways.\r\n" );
document.write( "We choose the 5th digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "So there are 4∙4∙3∙2∙1 = 96 five-digit numbers.\r\n" );
document.write( "\r\n" );
document.write( "Case 2. The number has 4-digits and does not contain 0 as a digit.\r\n" );
document.write( "\r\n" );
document.write( "Then it must be an arrangement of 3,4,5,6.  Any such arrangement is divisible by\r\n" );
document.write( "3 because 3+4+5+6 = 18.\r\n" );
document.write( "\r\n" );
document.write( "Since it must be greater than 5000 there are only 2 choices for its first digit,\r\n" );
document.write( "5 and 6.\r\n" );
document.write( "\r\n" );
document.write( "We can choose the first digit 2 ways.\r\n" );
document.write( "We can choose the second digit 3 ways.\r\n" );
document.write( "We can choose the third digit 2 ways.\r\n" );
document.write( "We can choose the fourth digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "So there are 2∙3∙2∙1 = 12 ways for case 1\r\n" );
document.write( "\r\n" );
document.write( "Case 3. The number has 4-digits and contains 0 as a digit.\r\n" );
document.write( "\r\n" );
document.write( "Then the other 3 digits besides 0, must have a sum which is divisible by 3,\r\n" );
document.write( "since the 0 will not change the sum of the digits.\r\n" );
document.write( "\r\n" );
document.write( "So the other three digits must be 3,4,5 or 4,5,6, because 3+4+5=12, which\r\n" );
document.write( "is divisible by 3, and 4+5+6=15, which is also divisible by 3. \r\n" );
document.write( "[Note: The only other two combinations of digits 3,4,6 and 3,5,6 do not have \r\n" );
document.write( "sums divisible by 3.]\r\n" );
document.write( "\r\n" );
document.write( "Sub-Case 3A:  Its digits are 3,4,5,0\r\n" );
document.write( "\r\n" );
document.write( "We can choose the 1st digit 1 way, (as 5).\r\n" );
document.write( "We can choose the 2nd digit 3 ways.\r\n" );
document.write( "We can choose the 3rd digit 2 ways. \r\n" );
document.write( "We can choose the 4th digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "That's 1∙3∙2∙1 = 6 ways.\r\n" );
document.write( "\r\n" );
document.write( "Sub-Case 3B:  Its digits are 4,5,6,0\r\n" );
document.write( "\r\n" );
document.write( "We can choose the 1st digit 2 ways, (as 5 or 6).\r\n" );
document.write( "We can choose the 2nd digit 3 ways.\r\n" );
document.write( "We can choose the 3rd digit 2 ways. \r\n" );
document.write( "We can choose the 4th digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "That's 2∙3∙2∙1 = 12 ways.\r\n" );
document.write( "\r\n" );
document.write( "Answer: Adding all numbers for all the cases and sub-cases:\r\n" );
document.write( "\r\n" );
document.write( "96+12+6+12 = 126 integers.\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );