document.write( "Question 464325: What is the sum of all the 4-digit numbers all of whose digits are odd?
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #318081 by jorel1380(3719)\"\" \"About 
You can put this solution on YOUR website!
The sum of all numbers between 1 and n can be found using the equation:n(n+1)/2
\n" ); document.write( "So, therefore, the sum of all numbers between 1 and 1000 is
\n" ); document.write( "1000(1001)/2=500500
\n" ); document.write( "Likewise, the sum of all numbers between 1 and 9999 is
\n" ); document.write( "9999(10000)/2=49995000
\n" ); document.write( "Thus, the total of all numbers between 1000 and 9999 is the difference between the two, or
\n" ); document.write( "49995000-500500=49494500
\n" ); document.write( "The sum of all the odd integers in that span is roughly 1/2 of all the integers so our answer is
\n" ); document.write( "49494500/2=24747250..
\n" ); document.write( "
\n" ); document.write( "
\n" );