Some basic examples of étale fundamental groups I'm trying to get a better understanding of étale fundamental groups, and I think that the overall idea -- the big picture -- is beginning to become clear, but my computational ability seems to be essentially nonexistent.  
I think that I understand some of the simpler examples (like $\pi(\text{Spec }K)$, when $K$ is a field), but could someone please explain a slightly more complicated (at least in my view) example?  Perhaps (to move away from examples involving fields)  something like $\pi(\text{Spec }\mathbb{Z}[X])$ or $\pi(\text{Spec }\mathbb{Z}[1/p])$?
 A: I believe that $\pi(\text{Spec } \mathbf Z[1/p])$ is the Galois group of the maximal extension of $\mathbf Q$ unramified outside $p$.
On the other hand, I believe that $\pi(\text{Spec }\mathbf Z[X])$ is trivial. If $Y$ were finite étale over $\mathbf Z[X]$, then for each $n$, the base-change $Y_n$ of $Y$ under the map $$\mathbf Z[X] \to \mathbf Z : X \mapsto n$$ would be finite étale over $\mathbf Z$, hence trivial (as you surely know that $\pi(\mathbf Z) = 0$). It seems that the coefficients of a polynomial defining $Y$ would have to vanish at every integer...
It's no reason that the étale fundamental group is hard or even impossible to calculate. Absolute Galois groups, the simplest case, are very difficult to calculate! (What does it even mean to "calculate" the absolute Galois group of $\mathbf Q$? I don't know!)
Another nice example comes from elliptic curves. If $E/\mathbf Q$ is an elliptic curve, then $\pi(E) = TE,$ the 'global' Tate module of $E$ : $$TE = \varprojlim_n E[n],$$ where the integers are ordered by divisibility ($E[n]$ denotes the $n$-torsion of $E$ over $\overline{\mathbf Q}$). It is a free $\widehat{\mathbf Z}$-module of rank $2$ (note that it's abelian, a rare feat for a fundamental group!). This is the "$\text{GL}_2$" analogue of the fact (which you probably also know) that $\pi(\mathbf G_m) = \widehat{\mathbf Z}$, where $\mathbf G_m = \text{Spec }\mathbf Q[X, X^{-1}]$ is the multiplicative group over $\mathbf Q$. The proof goes as follows: if $f: E' \to E$ is a finite étale covering of degree $n$, then $E'$ must have genus $1$ by Riemann-Hurwiz. By possibly extending the base field, it acquires a point, in such a way that $f$ becomes an isogeny. By pre-composing $f$ with the dual isogeny, we get the map $E \to E' \to E$ which is just multiplication by $n$ on $E$ (which is defined over $\mathbf Q$!). Thus the multiplication-by-$n$ maps form a cofinal system in the category of finite étale coverings, and the result follows.
Also, it is no coincidence that the fundamental group (in the usual sense) of a torus is $\mathbf Z^2$!
A: Lenstra's introduction to Galois theory for schemes is very gentle and discusses some basic examples:
Proposition (Corollary 6.17): If $X$ is a normal integral scheme with function field $K$, and $M$ is the composite of all finite separable extensions $L$ of $K$ in some fixed algebraic closure $\overline{K}$ such that $X$ is unramified in $L$, then $\pi_1(X)$ is isomorphic to the Galois group $\mathrm{Gal}(M/K)$.
In particular (Exercise 6.27): If $X$ is a smooth curve with function field $K$, then $\pi_1(X)$ is the quotient $\mathrm{Gal}(K^{sep}/K) / N$, where $N$ is the closed subgroup generated by all inertia subgroups $I_x$ with $x \in X$ closed.
Examples (6.18, 6.22, 6.23, 6.24)


*

*If $K$ is a number field and $A=\mathcal{O}_K$, $a \in A$, $X=\mathrm{Spec}(A[1/a])$, then $M/K$ is the largest Galois extension which is umramified at all non-zero primes not dividing $a$. 

*$\pi_1(\mathrm{Spec}(\mathbb{Z}))=\{1\}$ (since Minkowski's Theorem implies that every proper algebraic extension of $\mathbb{Q}$ ramifies at some prime number).

*$\pi_1(\mathrm{Spec}(\mathbb{Z}_p)) = \widehat{\mathbb{Z}}$

*If $K$ is a field, then $\pi_1(\mathbb{P}^1_K)=\pi_1(\mathrm{Spec}(K))$

*If $K$ is a field of characteristic $0$, then $\pi_1(\mathbb{A}^1_K)=\pi_1(\mathrm{Spec}(K))$

*If $A$ is a finite ring, then $\pi_1(\mathrm{Spec}(A)) \cong \prod_{\mathfrak{m} \in \mathrm{Spec}(A)} \hat{\mathbb{Z}}$.


Exercises (6.31 $-$ 6.40)


*

*$\pi_1(\mathbb{A}^1_{\mathbb{Z}})$ and $\pi_1(\mathbb{P}^1_{\mathbb{Z}})$ are trivial.

*The ring homomorphism $\mathbb{Z}_p \to \mathbb{Z}/p^n$ induces an isomorphism $\pi_1(\mathrm{Spec}(\mathbb{Z}/p^n)) \to \pi_1(\mathrm{Spec}(\mathbb{Z}_p))$.

*If $A$ is a complete local ring with residue class field $k$, then $\pi_1(\mathrm{Spec}(A)) \cong \pi_1(\mathrm{Spec}(k))$.

*$\pi_1(\mathrm{Spec}(\mathbb{Z}[i]))$ and $\pi_1(\mathrm{Spec}(\mathbb{Z}[(1 + \sqrt{-3})/2]))$ are trivial.

*$\pi_1(\mathrm{Spec}(\mathbb{Z}[\zeta_{20}]))$ and $\pi_1(\mathrm{Spec}(\mathbb{Z}[(1 + \sqrt{-163})/2]))$ are trivial.

*$\pi_1(\mathrm{Spec}(\mathbb{Z}[\sqrt{-5}]))$ has order two.

*$\pi_1(\mathrm{Spec}(\mathbb{Z} \times_{\mathbb{Z}/(6)} \mathbb{Z})) \cong \widehat{\mathbb{Z}}$

*$\pi_1(\mathrm{Spec}(\mathbb{Z}[x]/(x^6-1))) \cong \widehat{\mathbb{Z}}$

*$\pi_1(\mathrm{Spec}(\mathbb{Z}[\sqrt{-3}]))$ has order two.


Let me finish with the following remark: Every profinite group arises as the fundamental group of some connected scheme. See here.
