Problem 52567. Easy Sequences 7: Easy as Composite Pi
Solution Stats
Problem Comments
-
3 Comments
I mean...doing this above 1e10 won't be easy anyway, no matter prime or composite.
Lincoln Poon,
Yes, they're really the same problem, as (designating the composite counting function as κ(n)), κ(n) + ?(n) + 1 = n. There are techniques to do the count without creating an array for x>√n, and even for x>∛n.
If anyone does find a way to solve this precisely without some hack, please, publish a scientific paper, and do not post your code here. This problem is not made from an easy sequence at all.
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15638 Solvers
-
3448 Solvers
-
Project Euler: Problem 7, Nth prime
1569 Solvers
-
Convert a numerical matrix into a cell array of strings
2097 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
1905 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!