Python | sympy.composite() method Last Updated : 27 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. Syntax: composite(n) Parameter: n - It denotes the nth composite number. Returns: Returns the nth composite number. Example #1: Python3 # import sympy from sympy import composite n = 5 # Use composite() method nth_composite = composite(n) print("The {}th composite is {}".format(n, nth_composite)) Output: The 5th composite is 10 Example #2: Python3 # import sympy from sympy import composite n = 25 # Use composite() method nth_composite = composite(n) print("The {}th composite is {}".format(n, nth_composite)) Output: The 25th composite is 38 Comment More infoAdvertise with us Next Article Python | sympy.composite() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.compositepi() method With the help of sympy.compositepi() method, we can find the number of composite numbers less than or equal to a given number. Syntax: compositepi(n) Parameter: n - It denotes the number up to which the count of composite number is calculated. Returns: Returns the number of composite numbers less th 1 min read Python | sympy.is_composite method With the help of sympy.is_composite method, we can check whether element is composite or not this method will return the boolean value i.e True or False. Syntax : sympy.is_composite Return : Return True if composite else False. Example #1 : In this example we can see that by using sympy.is_composite 1 min read Python | sympy.compare() method With the help of sympy.compare() method, we can compare the variables and it will return 3 values i.e -1 for smaller, 0 for equal and 1 for greater by using sympy.compare() method. Syntax : sympy.compare() Return : Return the value of comparison i.e -1, 0, 1. Example #1 : In this example we can see 1 min read Python | sympy.fromiter() method With the help of sympy.fromiter() method, we can iterate over the loop and can add elements in tuples and list by using sympy.fromiter() method. Syntax : sympy.fromiter() Return : Return the elements from iteration. Example #1 : In this example we can see that by using sympy.fromiter() method, we ar 1 min read Python | sympy.core() method With the help of sympy.core() method, we can calculate the core_t(n) of a positive integer n. core(n, t) calculates the t-th power free part of n. If nâs prime factorization is : n = \prod_{i=1}^\omega p_i^{m_i} then core_t(n) = \prod_{i=1}^\omega p_i^{m_i \mod t} Syntax: core(n, t=2) Parameter: n - 1 min read Like