def S(x, n): s = 0 for i in range(1, n + 1): s += Power(x, 2 * i) return s
def S(x, n): s = 0 for i in range(1, n + 1): s += Power(x, n) / Factorial(n) return s
def IsSquare_2(n): return Power(n, 1/2) == int(Power(n, 1/2))
def S(x, n): s = 0 for i in range(0, n): s += Power(x, 2 * i + 1) return s
def IsSquare(n): for i in range(1, int(math.sqrt(n))+1): if Power(i, 2) == n: return True return False