870125


[tag:]

円周率小数第1,601,382桁目に初めて出現するらしい。

# ご協力頂いた方々 : SUPER_PI.EXE, python

SUPER_PI.EXEで209万桁の表を出力(pi.dat)

def search_pi(num):
    num=str(num)
    if not all(x.isdigit() for x in num):
        print "Cannot search {}".format(num)
        return
    with open('pi.dat') as f:
        pi="".join(["".join(l.split()) for l in filter(lambda x:x!="\n", f.readlines())])
    try:
        return pi.index(num)-4 # pi='PI=3.1415926535897932384...'
    except ValueError:
        print "{} not found".format(num)
        return

for year in range(2000,2013):
    pidigit=search_pi(year)
    print "{} is found at {} - {}".format(year, pidigit, pidigit+3)

--->

2000 is found at   600 -   603
2001 is found at 12232 - 12235
2002 is found at 30926 - 30929
2003 is found at 25410 - 25413
2004 is found at  7235 -  7238
2005 is found at 33382 - 33385
2006 is found at  8623 -  8626
2007 is found at  2805 -  2808
2008 is found at 11651 - 11654
2009 is found at  8184 -  8187
2010 is found at  1009 -  1012
2011 is found at  5774 -  5777
2012 is found at  7200 -  7203