Problem 52397. Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 is the 6th composite number. Write a program that takes the value of n and give the nth composite as output,
Solution Stats
Problem Comments
-
2 Comments
Dyuman Joshi
on 1 Aug 2021
You mean Composite number, right?
Apurbo Roy Chowdhury
on 1 Aug 2021
My bad, I corrected that mistake, thanks for noticing.
Solution Comments
Show commentsProblem Recent Solvers41
Suggested Problems
-
Select every other element of a vector
35897 Solvers
-
7849 Solvers
-
Vectorize the digits of an Integer
335 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
703 Solvers
-
Find the index of n in magic(n)
268 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!