2012-01-08

870125

円周率小数第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

mapBetween

http://blog.livedoor.jp/dankogai/archives/51763038.html
より、mapBetweenのPython実装。

def mapBetween(lis,func=lambda x,y:x+y):
    try:
        return map(func, lis[:-1], lis[1:])
    except TypeError:
        print 'func should be a binary operator'
        return

2012-01-04

2012 = x + y

どことなく「2012」、どことなく横にした「辰」…、
的な、感じの、ニュアンスを、、、こう、、、思いが届けばと。
(ラーメンズ「Big news」より)


足して2012になる素数の組は

 13,  19,  61,  79, 139, 151, 181, 211, 223,
229, 271, 313, 349, 433, 463, 523, 541, 613,
631, 691, 709, 733, 811, 859, 883, 919, 991

とその相方の27組。

円周率の小数点以下第7200桁目から第7203桁目に、
初めて"2012"が並ぶ(たぶん)。