\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{letterpaper,total={408pt,9.0in}}
%% Custom Page Layout Adjustments (use latex.geometry)
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{positioning}
\usepgfplotslibrary{fillbetween}
\usepackage{pstricks}
\usepackage{phaistos}
\usepackage{xcolor}
\ifdefined\tikzset
\tikzset{ampersand replacement = \amp}
\fi
\newcommand{\order}[1]{\left\lvert#1\right\rvert}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\begin{document}
\pagestyle{empty}
\resizebox{\width}{\height}{
{
  \definecolor{summand}{rgb}{0.1, 0.1, 0.95}
  \definecolor{pair}{rgb}{0.9, 0.45, 0}
  \huge
  \begin{tikzpicture}
    \draw [dashed] (0.5-0.5*6.5,-0.866025*6.5) -- (7-0.5*6.5,-0.866025*6.5);
    \draw [very thick] (2-0.5*7,-0.866025*7) -- (2-0.5*4,-0.866025*4) -- (5-0.5*7,-0.866025*7);
    \foreach \x in {1,...,6}
      \foreach \y in {1,...,\x}
        \shade[ball color=summand!30]  (\y-0.5*\x,-0.866025*\x) circle (0.2cm);
    \foreach \y in {1,...,7}
      \shade[ball color=pair!40]  (\y-0.5*7,-0.866025*7) circle (0.2cm);
    \node at (2.5,-0.5) [anchor=north west]{$\color{summand}\sum\limits_{k=1}^nk\color{black}=\color{pair}\binom{n+1}{2}$};
    \shade[ball color=summand]  (2-0.5*4,-0.866025*4) circle (0.2cm);
    \shade[ball color=pair]  (2-0.5*7,-0.866025*7) circle (0.2cm);
    \shade[ball color=pair]  (5-0.5*7,-0.866025*7) circle (0.2cm);
  \end{tikzpicture}
}
}
\end{document}
