Python | sympy.euler() method Last Updated : 14 Jul, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of sympy.euler() method, we can find the Euler number and Euler polynomial in SymPy. euler(n) - Syntax: euler(n) Parameter: n - It denotes the nth Euler number. Returns: Returns the nth Euler number. Example #1: Python3 # import sympy from sympy import * n = 4 print("Value of n = {}".format(n)) # Use sympy.euler() method nth_euler = euler(n) print("Value of nth euler number : {}".format(nth_euler)) Output: Value of n = 4 Value of nth euler number : 5 euler(n, k) - Syntax: euler(n, k) Parameter: n - It denotes the order of the Euler polynomial. k - It denotes the variable in the Euler polynomial. Returns: Returns the expression of the Euler polynomial or its value. Example #2: Python3 # import sympy from sympy import * n = 5 k = symbols('x') print("Value of n = {} and k = {}".format(n, k)) # Use sympy.euler() method nth_euler_poly = euler(n, k) print("The nth euler polynomial : {}".format(nth_euler_poly)) Output: Value of n = 5 and k = x The nth euler polynomial : x**5 - 5*x**4/2 + 5*x**2/2 - 1/2 Example #3: Python3 # import sympy from sympy import * n = 4 k = 3 print("Value of n = {} and k = {}".format(n, k)) # Use sympy.euler() method nth_euler_poly = euler(n, k) print("The nth euler polynomial value : {}".format(nth_euler_poly)) Output: Value of n = 4 and k = 3 The nth euler polynomial value : 30 Comment More infoAdvertise with us Next Article Python | sympy.is_even() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.evalf() method With the help of sympy.evalf() method, we are able to evaluate the mathematical expressions. Syntax : sympy.evalf() Return : Return the evaluated mathematical expression. Example #1 : In this example we can see that by using sympy.evalf() method, we are able to evaluate the mathematical expressions. 1 min read Python | sympy.Integer() method With the help of sympy.Integer() method, we can convert the floating point to integer values and this method very efficient in term of memory if we want to save integer value. Syntax : sympy.Integer() Return : Return integer value. Example #1 : In this example we can see that by using sympy.Integer( 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 Python | sympy.is_even() method In the sympy module, we can test whether a given number n is even or not using sympy.is_even() function. Syntax: sympy.is_even(n) Parameter: n; number to be tested Return: bool value result Code #1: Python3 # Python program to check even number # using sympy.is_even() method # importing sympy module 1 min read Python | sympy.Float() method With the help of sympy.Float() method, we can convert the integer values to floating point values and by using this method we can also set the values of precision. By default value of precision is 15. Syntax : sympy.Float() Return : Return the floating point number. Example #1 : In this example we c 1 min read Python | sympy.lucas() method With the help of sympy.lucas() method, we can find Lucas numbers in SymPy. lucas(n) - Lucas numbers satisfy a recurrence relation similar to that of the Fibonacci sequence, in which each term is the sum of the preceding two. They are generated by choosing the initial values L_0 = 2 and L_1 = 1 and t 1 min read Like