I would like to create a diagram similar to this using TikZ.
I can draw the circles with nested for-loops, as shown below; but I don't see an easy way to draw them in two different colors. Can someone help me to find an elegant solution?
\documentclass{amsart}
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{tikzpicture}[xscale=0.3,yscale=0.3]
\foreach \x in {0,...,19}
\foreach \y in {0,...,\x}
\draw [fill=red] (\x - \y / 2, \y * 0.866) circle (0.2);
\end{tikzpicture}
\caption{The 20th triangular number}
\end{figure}
\end{document}
%
means. (modulo?)