Problem 52567. Easy Sequences 7: Easy as Composite Pi
The prime Pi function is defined as the number of prime numbers from 1 to a certain given limit. In MATLAB, it is easy to create a prime Pi procedure, because there are built-in functions such as "primes" and "isprime". To calculate the prime Pi up to 100, we may just proceed as follows:
Can we make a function for "composite Pi", which is the number of composite numbers from 1 to a given limit, inclusive? Let's find out...
NOTE: The number '1' is considered as neither prime nor composite.
Solution CommentsShow comments
Problem Recent Solvers4