Today, the user N3buchadnezzar asked on TeX.SX, how he could draw images of triangular numbers. He showed a picture: Martin Heller showed a nice and clean solution: \documentclass{article}
\usepackage{tikz}
%
\newcommand\drawballs[]{%
\foreach \y [evaluate=\y as \yy using #2+1-\y]
in {1,...,#2} {%
\foreach \x in {1,...,\yy} {%
};
}%
}
%
\begin{document}
\begin{tikzpicture}
\drawballs{1}
\drawballs[xshift=2cm]{2}
\drawballs[xshift=5cm]{3}
\end{tikzpicture}
\end{document}


There were several further answers, such as by Altermundus, using tkz-euclide: \usepackage{tkz-euclide}
...
\begin{tikzpicture}
\foreach \i in {0,...,3}
{\tkzDefPoint(2*\i,0){O\i}
\tkzDrawCircle[R,ball color=gray!20](O\i,1cm)}
\foreach \i [count=\j from 0] in {4,...,6}
{\tkzDefShiftPoint[O\j](60:2){O\i}
\tkzDrawCircle[R,ball color=gray!20](O\i,1cm)}
\foreach \i [count=\j from 4] in {7,...,8}
{\tkzDefShiftPoint[O\j](60:2){O\i}
\tkzDrawCircle[R,ball color=gray!20](O\i,1cm)}
\foreach \i [count=\j from 7] in {8,...,8}
{\tkzDefShiftPoint[O\j](60:2){O\i}
\tkzDrawCircle[R,ball color=gray!20](O\i,1cm)}
\end{tikzpicture}