document.write( "Question 1149415: 120 five-cent coins are arranged in a row. Then in sequence, every second coin is replaced with a ten-cent coin, every third coin is replaced with a 20-cent coin, every fourth coin is replaced with a 50-cent coin, and every fifth coin is replaced with a dollar coin. The total value of the 120 coins is then:
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #770881 by Edwin McCravy(20060)\"\" \"About 
You can put this solution on YOUR website!
Let there be 120 coin-positions numbered 1-120.\r\n" );
document.write( "\r\n" );
document.write( "Let the set of largest factors be F = {1,2,3,4,5}\r\n" );
document.write( "\r\n" );
document.write( "For any coin-position numbered k, if the largest factor of k in F is 1,2,3,4,5,\r\n" );
document.write( "respectively, then the kth coin-position in the end will have a monetary value\r\n" );
document.write( "of 5,10,20,50,100 cents, respectively. \r\n" );
document.write( "\r\n" );
document.write( "For each member k of F, we will enumerate the coin-position-numbers which have k\r\n" );
document.write( "as their largest factor.\r\n" );
document.write( "\r\n" );
document.write( "The number of coin-positions that have as their largest factor of k which is in\r\n" );
document.write( "F is essentially calculated by this method:\r\n" );
document.write( "\r\n" );
document.write( "the number that have that largest factor in F MINUS the number that have a\r\n" );
document.write( "greater largest factor on F.\r\n" );
document.write( "\r\n" );
document.write( "We use the method of inclusion and exclusion, often called the \"sieve\" formula.\r\n" );
document.write( "\r\n" );
document.write( "This is the method where we start out counting too many, and so we subtract\r\n" );
document.write( "some. But then we subtract too many, so we add some back. But we add back too\r\n" );
document.write( "many.  So we subtract some more.  But we subtract too many.  So we add some\r\n" );
document.write( "more, etc., and we continue this addition/subtraction process until there is no\r\n" );
document.write( "more to add or subtract.\r\n" );
document.write( "\r\n" );
document.write( "In this case our formula is this sequence with alternating signs:\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "We first enumerate the number of coin positions which have 1 as their largest\r\n" );
document.write( "factor in F.  This will require all 5 terms of the formula. \r\n" );
document.write( "\r\n" );
document.write( "First term:\r\n" );
document.write( "The number of coin-positions which have factor 1.  That's all 120, since all\r\n" );
document.write( "have factor 1.\r\n" );
document.write( "Total = 120\r\n" );
document.write( "\r\n" );
document.write( "Second term:\r\n" );
document.write( "The number of coin-positions which have factors 1 and 2.  That's 120/2=60\r\n" );
document.write( "The number of coin-positions which have factors 1 and 3.  That's 120/3=40\r\n" );
document.write( "The number of coin-positions which have factors 1 and 4.  That's 120/4=30\r\n" );
document.write( "The number of coin-positions which have factors 1 and 5.  That's 120/5=24\r\n" );
document.write( "Total = 60+40+30+24=154\r\n" );
document.write( "\r\n" );
document.write( "Third term:\r\n" );
document.write( "The number of coin-positions which have factors 1, 2 and 3.  That's 120/6=20\r\n" );
document.write( "The number of coin-positions which have factors 1, 2 and 4.  That's 120/4=30\r\n" );
document.write( "The number of coin-positions which have factors 1, 2 and 5.  That's 120/10=12\r\n" );
document.write( "The number of coin-positions which have factors 1, 3 and 4.  That's 120/12=10\r\n" );
document.write( "The number of coin-positions which have factors 1, 3 and 5.  That's 120/15=8\r\n" );
document.write( "The number of coin-positions which have factors 1, 4 and 5.  That's 120/20=6\r\n" );
document.write( "Total = 20+30+12+10+8+6=86\r\n" );
document.write( "\r\n" );
document.write( "Fourth term:\r\n" );
document.write( "The number of coin-positions which have factors 1, 2, 3 and 4.  That's 120/12=10\r\n" );
document.write( "The number of coin-positions which have factors 1, 2, 3 and 5.  That's 120/30=4\r\n" );
document.write( "The number of coin-positions which have factors 1, 2, 4 and 5.  That's 120/20=6\r\n" );
document.write( "The number of coin-positions which have factors 1, 3, 4 and 5.  That's 120/60=2\r\n" );
document.write( "Total = 10+4+6+2=22\r\n" );
document.write( "\r\n" );
document.write( "Fifth term:\r\n" );
document.write( "The number of coin-positions which have factors 1, 2, 3, 4 and 5.  That's\r\n" );
document.write( "120/60=2\r\n" );
document.write( "Total = 2\r\n" );
document.write( "\r\n" );
document.write( "Substituting in the formula: 120-154+86-22+2 = 32 with largest factor in F as\r\n" );
document.write( "1.  These 32 end up as they started, with a 5 cent coin.  So their monetary\r\n" );
document.write( "value is 32∙5 cents = £1.60.\r\n" );
document.write( "\r\n" );
document.write( "--------------------------------------------------------\r\n" );
document.write( "\r\n" );
document.write( "Next we enumerate the number of coin positions which have 2 as their largest\r\n" );
document.write( "factor in F.  This will require 4 terms of the formula.\r\n" );
document.write( "\r\n" );
document.write( "First term:\r\n" );
document.write( "The number of coin-positions which have factor 2.  That's 120/2=60.\r\n" );
document.write( "Total = 60\r\n" );
document.write( "\r\n" );
document.write( "Second term:\r\n" );
document.write( "The number of coin-positions which have factors 2 and 3.  That's 120/6=20\r\n" );
document.write( "The number of coin-positions which have factors 2 and 4.  That's 120/4=30\r\n" );
document.write( "The number of coin-positions which have factors 2 and 5.  That's 120/10=12\r\n" );
document.write( "Total = 62\r\n" );
document.write( "\r\n" );
document.write( "Third term:\r\n" );
document.write( "The number of coin-positions which have factors 2, 3 and 4.  That's 120/12=10\r\n" );
document.write( "The number of coin-positions which have factors 2, 3 and 5.  That's 120/30=4\r\n" );
document.write( "The number of coin-positions which have factors 2, 4 and 5.  That's 120/20=6\r\n" );
document.write( "Total = 20\r\n" );
document.write( "\r\n" );
document.write( "Fourth term:\r\n" );
document.write( "The number of coin-positions which have factors 2, 3, 4 and 5.  That's 120/60=2\r\n" );
document.write( "\r\n" );
document.write( "Substituting in the formula: 60-62+20-2 = 16 with greatest factor 2.\r\n" );
document.write( "These 16 end up with a 10-cent coin.  So their value is 16∙10 cents = £1.60.\r\n" );
document.write( "\r\n" );
document.write( "--------------------------------------------------------\r\n" );
document.write( "\r\n" );
document.write( "Next we enumerate the number of coin positions which have 3 as their largest\r\n" );
document.write( "factor in F.  This will require 3 terms of the formula.\r\n" );
document.write( "\r\n" );
document.write( "First term:\r\n" );
document.write( "The number of coin-positions which have factor 3.  That's 120/3=40.\r\n" );
document.write( "Total = 40\r\n" );
document.write( "\r\n" );
document.write( "Second term:\r\n" );
document.write( "The number of coin-positions which have factors 3 and 4.  That's 120/12=10\r\n" );
document.write( "The number of coin-positions which have factors 3 and 5.  That's 120/15=8\r\n" );
document.write( "Total = 10+8=18\r\n" );
document.write( " \r\n" );
document.write( "Third term:\r\n" );
document.write( "The number of coin-positions which have factors 3, 4 and 5.  That's 120/60=2\r\n" );
document.write( "Total = 2\r\n" );
document.write( "\r\n" );
document.write( "Substituting in the formula: 40-18+2 = 24 with largest factor in F as 3.\r\n" );
document.write( "These 24 end up with a 20-cent coin.  So their value is 24∙20 cents = £4.80.\r\n" );
document.write( "\r\n" );
document.write( "--------------------------------------------------------\r\n" );
document.write( "\r\n" );
document.write( "Next we enumerate the number of coin positions which have 4 as their largest\r\n" );
document.write( "factor in F.  This will require 2 terms of the formula.\r\n" );
document.write( "\r\n" );
document.write( "First term:\r\n" );
document.write( "The number of coin-positions which have factor 4.  That's 120/4=30.\r\n" );
document.write( "Total = 30\r\n" );
document.write( "\r\n" );
document.write( "Second term:\r\n" );
document.write( "The number of coin-positions which have factors 4 and 5.  That's 120/20=6\r\n" );
document.write( "Total = 6\r\n" );
document.write( " \r\n" );
document.write( "Substituting in the formula: 30-6 = 24 with greatest factor in F as 4.\r\n" );
document.write( "These 24 coin positions end up with a 50-cent coin.  So their monetary value is 24∙50 cents = £12.00.\r\n" );
document.write( "\r\n" );
document.write( "----------------------------------\r\n" );
document.write( "\r\n" );
document.write( "So the total monetary value of all the coins in the end is \r\n" );
document.write( "£1.60 + £1.60 + £4.80 + £12.00 + £24.00 = £44.00\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );