With the help of sympy.composite() method, we can find the nth composite number, with the composite number indexed as composite(1) = 4, composite(2) = 6, etc.
n – It denotes the nth composite number.
Returns: Returns the nth composite number.
The 5th composite is 10
The 25th composite is 38
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course