def generateLLTGraphData(n): """Generates timing data for the Lucas Lehmer test Args: n: generate primes up to n Returns: ps: list of primes generated Raises: nothing """ ps = primes.generate_primes(n) for p in ps: llt.lucas_lehmer(p) # Format the date string depending on what graphing application to # use. I'm testing matplotlib which a floating point number for dates # and times. # f.write("%d %s\n" % (p, time.strftime('%d%H%M%S'))) time = date2num(datetime.now()) #f.write("%d %s\n" % (p, time)) f.write("%s\n" % (time)) f.flush() f.close() return ps
def timelltM23(): """Test M(23), p = 11213""" p = 11213 result = llt.lucas_lehmer(p)
def timelltM22(): """Test M(22), p = 9941""" p = 9941 result = llt.lucas_lehmer(p)
def timelltM19(): """Test M(19), p = 4253""" p = 4253 result = llt.lucas_lehmer(p)
def timelltM18(): """Test M(18), p = 3217""" p = 3217 result = llt.lucas_lehmer(p)
def timelltM17(): """Time M(17), p = 2281""" p = 2281 result = llt.lucas_lehmer(p)