Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 289 Bytes
import math
def pi(n):
return int(math.floor(math.pi * n))
sequence = []
period = 1
current = 0
while True:
value = pi(current + 2) - pi(current + 1)
sequence.append(value)
if value != sequence[current % period]:
period = current + 1
print "p >=", period
current += 1