document.write( "Question 934680: How many counting numbers less than one million contain the digit 2? \n" ); document.write( "
Algebra.Com's Answer #567704 by Edwin McCravy(20055)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "From the 999999 positive integers less than 1 million,\r\n" );
document.write( "we must subtract: \r\n" );
document.write( "\r\n" );
document.write( "the number of non-negative integers that \r\n" );
document.write( "consist only of the 9 digits 0,1,3,4,5,6,7,8,9:\r\n" );
document.write( "\r\n" );
document.write( "To find the number to subtract we will do it as if we could include 0,\r\n" );
document.write( "and then subtract 1\r\n" );
document.write( "\r\n" );
document.write( "If we include 0, we can consider these all to be the 6-digit numbers: \r\n" );
document.write( "\r\n" );
document.write( "000000, 000001, 000003, 000004, ..., 999999.\r\n" );
document.write( "\r\n" );
document.write( "There are 9 ways to choose the first digit, 9 ways to choose\r\n" );
document.write( "the second digit, etc., and 9 ways to choose the sixth digit.\r\n" );
document.write( "\r\n" );
document.write( "That's 96 = 531441, including 0, and 531440, not including 0.\r\n" );
document.write( "\r\n" );
document.write( "Answer: 999999-531440 = 468559\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );