Finding 2016 in pi

2016 appears in π starting at the 7173rd decimal place:

You can confirm this with Mathematica or Wolfram Alpha:

        Mod[ Floor[10^7177 pi] , 10000]

I found it using the following Python code:

        >>> from sympy import pi
        >>> digits = str(pi.evalf(10000))[2:]
        >>> digits.find('2016')
        7173

By the way, it’s also true that 2016 = 1 + 2 + 3 + … + 63.

3 thoughts on “Finding 2016 in pi

  1. The corresponding code in Matlab is:

    p = sym(pi);
    v=vpa(p,10000);
    vc=char(v);
    strfind(vc,’2016′)

  2. 2016 is almost certainly the last triangular year of my life, then. How should I celebrate it?

Comments are closed.