% Title: Demonstration sans parole : somme des N premiers entiers
% Author: Jacques Duma
% Site: http://math.et.info.free.fr/TikZ/index.html

\documentclass{article}

\usepackage{ifthen}

\usepackage{tikz}

\begin{document}

\pagestyle{empty}

\section*{Somme des  premiers nombres entiers}

\vfill

\begin{center}
\begin{tikzpicture} [scale=.8]
	\draw[line width=5pt,gray,line cap=round] (1,2) -- (13,14) ;
	\foreach \x in {0,2,...,14}
		\foreach \y in {2,4,...,14}		
			{\ifthenelse	 {\x<\y}
				{\fill[ball color=blue] (\x,\y) circle (0.4);}
				{\fill[ball color=red] (\x,\y) circle (0.4);}}
\end{tikzpicture}
\end{center}

{\Huge $$1+2+3+\dots+n=\frac{n\times(n+1)}{2}$$}

\vfill

\end{document}
