document.write( "Question 1209362: There are 830 composite numbers less than 1000. Let S be the set of composite numbers smaller than 1000 that are not divisible by 2, 3, or 7. How many elements does S have? \n" ); document.write( "
Algebra.Com's Answer #848679 by math_tutor2020(3817)![]() ![]() ![]() You can put this solution on YOUR website! \n" ); document.write( "Answer: 120\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "-----------------------------------------------\r \n" ); document.write( "\n" ); document.write( "Explanation\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "To find the solution, we'll need the floor function. \n" ); document.write( "This function rounds a positive decimal number down to the nearest integer. \n" ); document.write( "Think of it like a vertical number line. \n" ); document.write( "As the name \"floor\" implies, we move down to the floor to magnetically lock onto the nearest integer.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Examples: \n" ); document.write( "floor(2.1) = 2 \n" ); document.write( "floor(7.9999999) = 7\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "It might be tempting to round 7.9999999 to 8, but just remember we round down to the floor. \n" ); document.write( "It doesn't matter how close to the ceiling the input is. \n" ); document.write( "Basically the floor function chops off the decimal when looking at positive numbers only. \n" ); document.write( "If the input is an integer, then no changes are made.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "There are 999 values in the set {1,2,3,...,999}
\n" ); document.write( "499+333+142-166-71-47+23 = 713 \n" ); document.write( "A Venn Diagram may come in handy.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "If we define P as the set of positive integers smaller than 1000 that are multiples of 2, 3, or 7, then there are 713 values in set P. \n" ); document.write( "Here are the first few items of set P \n" ); document.write( "2,3,4,6,7,8,9,10,12,14,15,16,18,20,21,22\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "There are 3 prime numbers in set P. Those values are 2,3,7 \n" ); document.write( "The remaining 713-3 = 710 items are composite since they are multiples of those trio of values mentioned. \n" ); document.write( "The instructions tell us there are 830 composite numbers in the set {1,2,3,4,...,999}. \n" ); document.write( "Note that 1 isn't composite and it's not prime either.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "So there are 830-710 = 120 values in set S.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "I have verified the answer is correct using a Python script. \n" ); document.write( "You can take this route as well, or you can use a spreadsheet to verify the answer.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "If you aren't given the 830 figure, then you can consult a list of primes to determine there are 168 primes in the set {2,3,...,999}. So that means there are 998-168 = 830 composite numbers in the set {2,3,...,999}. I've excluded the value \"1\" since it's neither prime nor composite.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "The first few values in set S would be 25,55,65,85,95,115,121,125 \n" ); document.write( " \n" ); document.write( " |