\documentclass{minimal}
\usepackage{amsmath}
\usepackage[active,tightpage]{preview}
\setlength\PreviewBorder{1pt}
\usepackage{pgf}
\usepackage{tikz}
\usepgfmodule{plot}
\usepgflibrary{plothandlers}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shadings}
\begin{document}
\begin{preview}
%tikz
\begin{tikzpicture}[every node/.style={draw,scale=1pt,
minimum width=30pt,inner sep=3pt,
line width=0pt,draw=black}]
\matrix[row sep=2pt,column sep=2pt]
{\node[fill=blue]{861};&
\node[fill=red]{863};&
\node[]{865};&
\node[fill=blue]{867};&
\node[]{869};&
\node[]{871};&
\node[fill=blue]{873};&
\node[]{875};&
\node[fill=red]{877};&
\node[fill=blue]{879};&
\node[left color=red,right color=green]{881};&
\node[left color=red,right color=green]{883};&
\node[fill=blue]{885};&
\node[fill=red]{887};&
\node[]{889};\\
\node[fill=blue]{831};&
\node[]{833};&
\node[]{835};&
\node[fill=blue]{837};&
\node[fill=red]{839};&
\node[]{841};&
\node[fill=blue]{843};&
\node[]{845};&
\node[]{847};&
\node[fill=blue]{849};&
\node[]{851};&
\node[fill=red]{853};&
\node[fill=blue]{855};&
\node[left color=red,right color=green]{857};&
\node[left color=red,right color=green]{859};\\
\node[fill=blue]{801};&
\node[]{803};&
\node[]{805};&
\node[fill=blue]{807};&
\node[left color=red,right color=green]{809};&
\node[left color=red,right color=green]{811};&
\node[fill=blue]{813};&
\node[]{815};&
\node[]{817};&
\node[fill=blue]{819};&
\node[left color=red,right color=green]{821};&
\node[left color=red,right color=green]{823};&
\node[fill=blue]{825};&
\node[left color=red,right color=green]{827};&
\node[left color=red,right color=green]{829};\\
};
\end{tikzpicture}
\end{preview}
\end{document}