def pk(k): N=1 for i in range(...,...): N=... return(1-N/365**k)