Write a Python function to return Fermat's Sequence


Topic: Write a Python function to return Fermat's Sequence

Solution

def fermat_seq(n):
    if n >= 0:
        return 2 ** (2**n) + 1
  



List all Python Programs