document.write( "Question 860655: How many 4 digit natural numbers can we form using the digits 1 to 7 if the number must be divisible by 3 \n" ); document.write( "
Algebra.Com's Answer #521473 by Edwin McCravy(20056)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "Suppose we were to list all 4-digit numbers we can make \r\n" );
document.write( "with the digits 1 to 7 in increasing order.  \r\n" );
document.write( "\r\n" );
document.write( "1111 will be #1 in the list.\r\n" );
document.write( "\r\n" );
document.write( "There are 74 = 2401 numbers in the list.  \r\n" );
document.write( "\r\n" );
document.write( "So 7777 will be #2401 in the list\r\n" );
document.write( "\r\n" );
document.write( "In order for a natural number to be a multiple of 3, the\r\n" );
document.write( "sum of its digits must be a multiple of 3.  That is,\r\n" );
document.write( "\r\n" );
document.write( "Its sum of digits modulo 3 must be 0\r\n" );
document.write( "\r\n" );
document.write( "We will investigate the sums of digits to find the ones \r\n" );
document.write( "in the list with sum of digits (modulo 3) = 0.\r\n" );
document.write( "\r\n" );
document.write( "We will use the notation d1 = 1st digit,..., d4 = 4th digit.\r\n" );
document.write( "\r\n" );
document.write( "To get the (n+1)st number in the list from the nth number\r\n" );
document.write( "in the list. we have four cases:\r\n" );
document.write( "\r\n" );
document.write( "Case 1:  (Example: 4756)\r\n" );
document.write( "\r\n" );
document.write( "d4 < 7, add 1 to d4. \r\n" );
document.write( "(In the example, we get 4757)  \r\n" );
document.write( "That adds 1 to the sum of digits.\r\n" );
document.write( "\r\n" );
document.write( "Case 2: (Example: 7347)\r\n" );
document.write( "\r\n" );
document.write( "d4 = 7, d3 < 7, increase d3 by 1, decrease d4 by 6.\r\n" );
document.write( "(In the example, we get 7351)\r\n" );
document.write( "So we have added -5 to the sum of digits.\r\n" );
document.write( "-5 is 1 more than a multiple of 3, (i.e., -5 = 1 (mod 3)  \r\n" );
document.write( "\r\n" );
document.write( "Case 3: (Example: 2577)\r\n" );
document.write( "\r\n" );
document.write( "d4 = 7, d3 = 7, d2 < 7. increase d2 by 1, decrease d3 by 6,\r\n" );
document.write( "and decrease d4 by 6. \r\n" );
document.write( "(In the example, we get 2611)\r\n" );
document.write( "So we have added -11 to the sum of digits.  \r\n" );
document.write( "-11 is 1 more than a multiple of 3, [i.e., -11 = 1 (mod 3)]  \r\n" );
document.write( "\r\n" );
document.write( "Case 4:  (Example: 1777)\r\n" );
document.write( "\r\n" );
document.write( "d4 = 7, d3 = 7, d2 = 7, d1 < 7. increase d2 by 1, decrease d3 by 6,\r\n" );
document.write( "and decrease d3 by 6. \r\n" );
document.write( "(In the example, we get 2111)\r\n" );
document.write( "So we have added -17 to the sum of digits. \r\n" );
document.write( "-17 is 1 more than a multiple of 3, (i.e., -17 = 1 (mod 3) \r\n" );
document.write( "\r\n" );
document.write( "Therefore, when we get each successive number, we add\r\n" );
document.write( "(1 mod 3) to the sum of digits.   \r\n" );
document.write( "\r\n" );
document.write( "Therefore every third number in the list has the equivalent\r\n" );
document.write( "sum of digits modulo 3.\r\n" );
document.write( "\r\n" );
document.write( "As we showed above, there are 74 or 2401 numbers in the list.\r\n" );
document.write( "\r\n" );
document.write( "The smallest number in the list which is a multiple of 3 is\r\n" );
document.write( "1113.  The largest number in the list which is a multiple of 3\r\n" );
document.write( "is 7776.  \r\n" );
document.write( "\r\n" );
document.write( "1113 is list #3 in the list and 7776 is list #2400.\r\n" );
document.write( "\r\n" );
document.write( "So list numbers #3, #6, #9, ..., #2400 are multiples of 3.\r\n" );
document.write( "\r\n" );
document.write( "Dividing those list numbers by 3, gives the sequence:\r\n" );
document.write( "                 1, 2, 3, ... , 800.\r\n" );
document.write( "\r\n" );
document.write( "So there are 800 4-digit natural numbers that we can form\r\n" );
document.write( "which are divisible by 3, if we use only the digits 1 to 7. \r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );