Recall that last time we were finishing up discussing longterm average values of certain arithmetic functions. We had that
Because of Euler's amazing solution to the Basel problem, we know that $$\sum_{d=1}^\infty \frac{1}{d^2}=\frac{\pi^2}{6}$$ so the constant in question is $\frac{\pi^2}{12}$.
We will discuss this computation again soon, when we return to the connection between number theory and such abstract series.
We ended with the question of yet another average value  that of the $\phi$ function. You can try out various ideas below. However, we aren't ready to prove anything about that quite yet.

Click to the left again to hide and once more to show the dynamic interactive window 
For now, we will be content to finally start to think about the most mysterious of all such functions. This is the prime counting function $\pi(x)$ or $\Pi(x)$, defined as $$\pi(x)=\#\{p\leq x\mid p\text{ is prime }\}\, .$$
We can find a very rudimentary bound on this function (a slight modification of something in Jones and Jones).
Fact: There are at least $$\frac{\ln(\ln(x)/\ln(2))}{\ln(2)}+1$$ primes less than or equal to $x$.
Proof:
As you can see below, this is not a very useful bound, considering there are actually 25 primes less than 100, not 3!

There are exact formulas for this function, believe it or not. The following formula is one of my favorites $$\pi(n)=1+\sum_{j=3}^{n}\left((j2)!j\left\lfloor\frac{(j2)!}{j}\right\rfloor\right)\, .$$ Can you see why this is not useful in practice?

But it works!
2262 2262 2262 2262 
Somewhat remarkably, the first people we know of compiling substantial data about this are Gauss and Legendre. See the handout.
This should sound 100% crazy! But Gauss and Legendre were no fools, and the accuracy is astounding. Let's call $Li(x)=\int_0^\infty \frac{dt}{\ln(t)}$ (yes, this is a convergent integral).
Click to the left again to hide and once more to show the dynamic interactive window 
Notice how much closer $Li(x)$ is than the $x/\ln(x)$ estimate. It's usually closer by several orders of magnitude.
Click to the left again to hide and once more to show the dynamic interactive window 
We'll pick up where this story left off next time! There is a lot more exciting action coming.
Homework: