document.write( "Question 349221: My first book required 1386 digits to consecutively number it pages.
\n" ); document.write( "A.) How many pages does my book have?
\n" ); document.write( "B.) How many times does the digit 6 appear in the book?
\n" ); document.write( "

Algebra.Com's Answer #249744 by Edwin McCravy(20060)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "The number of counting numbers from counting integer A through counting integer\r\n" );
document.write( "B, inclusive of A and B is B-A+1 \r\n" );
document.write( "\r\n" );
document.write( "The 1 digit numbers are the integers between 1 and 9, inclusive of 1 and 9, is\r\n" );
document.write( "9-1+1 = 9.   The page numbers with 1 digit account for 9 digits\r\n" );
document.write( "\r\n" );
document.write( "The 2 digit numbers are the integers between 10 and 99 inclusive of 10 and 99,\r\n" );
document.write( "is  99-10+1 = 90.    The page numbers with 2 digits account for 90*2 or 180\r\n" );
document.write( "digits.\r\n" );
document.write( "\r\n" );
document.write( "So the page numbers from 1 through 99 account for 9 + 180 or 189 digits.\r\n" );
document.write( "\r\n" );
document.write( "The 3 digit numbers are the integers between 100 and 999 inclusive of 100 and\r\n" );
document.write( "999, is  999-100+1 = 900.  The page numbers with 3 digits would account for\r\n" );
document.write( "900*3 or 2700.  Since this is more than the 1386 digits in the page numbers\r\n" );
document.write( "of the book, we know that the remainder of the pages consist entirely \r\n" );
document.write( "of 3-digit numbers.\r\n" );
document.write( "\r\n" );
document.write( "Since 189 of the 1386 digits come from 1 and 2 digit numbers, the remaining\r\n" );
document.write( "1386-189 or 1197 digits come from 3-digit numbers.  Dividing 1197 by 3 gives\r\n" );
document.write( "399, so the book contains 399 pages with 3-digit page numbers.\r\n" );
document.write( "\r\n" );
document.write( "Let N be the largest page number.  \r\n" );
document.write( " \r\n" );
document.write( "Using the formula:\r\n" );
document.write( "\r\n" );
document.write( "The number of counting numbers from counting integer 100 through counting\r\n" );
document.write( "integer N, inclusive of 100 and N is N-100+1 or N-99.\r\n" );
document.write( "So this must equal 399.  Setting these equal:\r\n" );
document.write( "\r\n" );
document.write( "                  N-99 = 399\r\n" );
document.write( "                     N = 498\r\n" );
document.write( "\r\n" );
document.write( "So the answer to A.) is 498 pages.\r\n" );
document.write( "\r\n" );
document.write( "--------------------------------------------\r\n" );
document.write( "\r\n" );
document.write( "Now we need to find the number of 6's in the counting numbers through 498.\r\n" );
document.write( "\r\n" );
document.write( "First we get the number of 6's in all the one's digits:\r\n" );
document.write( "\r\n" );
document.write( "The page numbers with 6's in the last (ones) digits are \r\n" );
document.write( "\r\n" );
document.write( "6,16,26,36,...,476,486,496\r\n" );
document.write( "\r\n" );
document.write( "It's easy to see there are 50 of these by looking at the numbers\r\n" );
document.write( "obtained by removing the 6's from the right end, considering the \r\n" );
document.write( "beginning 6 to be 06. Removing the 6's from the right ends, we \r\n" );
document.write( "would have the numbers\r\n" );
document.write( "\r\n" );
document.write( "0,1,2,3,...,47,48,49\r\n" );
document.write( "\r\n" );
document.write( "So the one's digits of all the page number contain 50 6's.\r\n" );
document.write( "\r\n" );
document.write( "Next we look at the page numbers with 6's as their tens digits:\r\n" );
document.write( "They are\r\n" );
document.write( "\r\n" );
document.write( "60-69,160-169,260-269,360-369,460-469\r\n" );
document.write( " \r\n" );
document.write( "Each of these 5 groups consists of 10 numbers each.\r\n" );
document.write( "\r\n" );
document.write( "So the ten's digits of all the page number also contain 50 6's.\r\n" );
document.write( "\r\n" );
document.write( "None of the hundreds digits are 6's, so the total number of 6's \r\n" );
document.write( "is 50+50 or 100 6's.\r\n" );
document.write( "\r\n" );
document.write( "So the answer to B.) is 100\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );