Ok, now for that more surprising second part [long story short, the connection to π enters in through the Mercator series, relating the series of reciprocal integers to rates of change of exponential growth, including rotation]:
For any Y, consider the product of Y - 1 with the sum of all the integer powers of Y; expanding this out, each power appears once added and once subtracted, so as to cumulatively cancel out to zero. Accordingly, in some sense*, whenever Y - 1 is invertible (in particular, nonzero), the sum of all the integer powers of Y is zero. [*: For anyone worrying about convergence issues, we can employ, for example, Cesàro summation for our use of this argument]
As a special case of this, letting K be a base of exponential growth and substituting K[sup]x[/sup] in for Y, we have that the sum of K[sup]nx[/sup] over all integers n is zero, over any region where K[sup]x[/sup] - 1 is invertible. Integrating this sum, we find that x + the sum of K[sup]nx[/sup]/(n ln(K)) over all nonzero integers n is constant over such a region; equivalently, ln(K) * x + the sum of K[sup]nx[/sup]/n over nonzero integers n is constant. [This is the key fact we will exploit to calculate our magic number; note the presence of the reciprocal integers in the coefficients of the sum]
To calculate this constant value, we would like to plug in a convenient value for x; unfortunately, the most convenient choice (choosing x such that K[sup]x[/sup] = 1, under which the terms of our infinite series for opposite nonzero values of n cancel out, leaving only ln(K) times our choice of x) is not available to us, as this would make K[sup]x[/sup] - 1 zero. But we can achieve pretty much the same cancellation effect with another choice: if K[sup]c[/sup] + 1 = 0, then our sum cancels out to simply ln(K) * c in the same way.
All of this was phrased in terms of arbitrary K so far, but in particular, making the convenient choice of K such that K[sup]x[/sup] is the operation of rotation by x many half revolutions, we have that K[sup]1[/sup] + 1 = 0, so that ln(K) * x + the sum of K[sup]nx[/sup]/n over all nonzero integers n is constantly ln(K) * 1 [over the suitable region where x goes from 0 to 2, causing K[sup]x[/sup] to trace out one full revolution]. In other words, the sum of K[sup]nx[/sup]/n over all nonzero integers n is constantly ln(K) * (1 - x).
Squaring the left hand side, it becomes a linear combination of K[sup]nx[/sup]s, each with coefficient equal to the sum of the reciprocal products of all pairs of nonzero integers adding up to n. In particular, when n = 0, this is the sum of the reciprocal products of all pairs of opposite nonzero integers; i.e., the sum of the reciprocal negated squares of the nonzero integers. In other words, the negation of our magic number.
Thus, if we could just find some linear operator which sends the function K[sup]nx[/sup] to 1 for n = 0 and to zero for other n, then our magic number would be equal to the absolute value of this operator on the function (ln(K) * (1 - x))[sup]2[/sup].
One particular such operator is the one which sends a function to its average value over the entire region of interest (from x = 0 to 2; for K[sup]nx[/sup] traces through n complete revolutions over this region, and thus, by symmetry, has average value zero for nonzero n). Our magic number is thus the absolute average value of (ln (K) * (1 - x))][sup]2[/sup] as x ranges from 0 to 2. [I.e., the variance of the value in radians of a random angle uniformly distributed through all 360 degrees]. That is, finishing off by “power rule” calculation, our magic number is |ln(K)|[sup]2[/sup]/3.
At this point, we note that, essentially by definition, |ln(K)| is π, and the argument is concluded.