You can use the \pgfmathparse macro to do this. It's documented in the (amazing) TikZ and PGF manual, in Part VII, but all you need to know right now is this: \pgfmathparse{...} evaluates the mathematical expression that is ... and stores the result in \pgfmathresult. The ... should look something like 3 + 4 * 5 - sin(6). I don't know that there's a better syntax for this, but if you use it to effectively declare variable up front (e.g., \pgfmathparse{...}\let\j\pgfmathresult), it's not bad.
Before I get to sample code, two other remarks. First, the reason the second case fails is that, as far as I understand, you can only use the ... in the one-variable case. Secondly, the first case—with \{i+2}—is sufficiently wrong that I feel it's worth pointing it out. On the one hand, \i is is a macro which expands to some value: first 0, then 1, and so on. On the other hand, i is a character which, when typeset, produces "i". There is no connection between the two. Thus, when you write \{i+2}, you're looking at five tokens: \{, i, +, 2, and }. The first one represents {, the second three represent themselves, and the last one will try to end the group after \foreach.
Anyway, using \pgfmathparse, we can get something like this:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}\begin{tikzpicture}
\foreach \i in {0,1,...,5} {
\pgfmathparse{60*\i}
\node[draw] (v\i) at (\pgfmathresult:2) {\i} ; % Polar coordinates
}
\foreach \i in {0,1,...,5} {
\pgfmathparse{mod(\i+2,6)}
\draw[->] (v\i) -- (v\pgfmathresult) ;
}
\end{tikzpicture}\end{center}
\end{document}
The first \foreach writes out the nodes in polar coordinates (which are (angle:radius)); the second one connects them as you desired.
letcommand. I now need to go back and rewrite all my horrible code to use that! – Andrew Stacey Oct 18 '10 at 18:46! Package PGF Math Error: Unknown function \int'. – Leah Wrenn Berman Oct 18 '10 at 19:54intdoesn't work: I thought it was because I didn't have PGF 2.0 installed, but that appears not to be the case. If I replace it with floor (to try to force an int), the arrows don't connect nicely to the nodes, but rather connect to the theta=0 part of a circle, which looks ugly and causes arrows to cross over the nodes. – Leah Wrenn Berman Oct 20 '10 at 17:59