How many primes are less than or equal to 100 by Inclusion Exclusion Rule And by using Mathematica
Published On :2020-12-21 17:32:00
Let P1=Integers that are less than or equal 100 and divisible by 2P2=Integers that are less than or equal 100 and divisible by 3
P3=Integers that are less than or equal 100 and divisible by 5
P4=Integers that are less than or equal 100 and divisible by 7
Thus number of primes less than or equal to 100= 4+N(P'1 P'2 P'3 P'4)
N(P'1 P'2 P'3 P'4)= N-N(P1)-N(P2)-N(P3)-N(P4)-N(P1P2)-N(P1P3)-N(P1P4)-N(P2P3)-N(P2P4)-N(P3P4)-N(P1P2P3)-N(P1P2P4)-N(P2P3P4)-N(P1P3P4)-N(P1P2P3P4)
So , number of primes less than or equal to 100=> 21+4=25
Now by using mathematica...