from math import *

def seuil() :
    n = 0
    I = 2
    ...
        n = n + 1
        I = (1+exp(-n*pi))/(n*n+1)

    return n
