I suppose the issue you're referring to is an error saying something like Extra alignment tab has been changed to \cr
. This is caused by you using more columns in the tabular
than defined in the argument to the environment.
That is, with \begin{tabular}{l r r r r r}
you specify six columns, the first one left aligned, the last five right aligned. However, in the first line of the table, you have around 12 columns (i.e. 11 &
, column separators), prompting the error.
So all you have to do to fix it is to change
{}&{}&{}&$n$&{}&{}&{}&{}&{}&$n$&{}&{}\\
\cline{2-6}\cline{8-12}
to
& & & $n$ & & \\
\cline{2-6}
Additional notes:
- The empty groups (
{}
) in the empty table cells aren't needed, so I removed them.
\center
isn't a command that takes an argument, use just \centering
, without any braces for what follows.
- I would use a
\baselineskip
(second argument of \fontsize
) that is a little larger than the fontsize (first argument), for example \fontsize{6}{7}
. (Actually, I wouldn't use \fontsize{}{}\selectfont
at all, but one of the standard commands for switching font size, listed in What point (pt) font size are \Large etc.?)
Complete code:
\documentclass{article}
\begin{document}
\begin{table}[hbtp]
\fontsize{6}{7}\selectfont
\caption{First 50 terms of $G(n)$}\label{tab13}
\centering
\begin{tabular}{l r r r r r}
\hline
& & & $n$ & & \\
\cline{2-6}
& 1 & 2 & 3 & 4 & 5 \\
\hline
$V(n+0)$ & 1 & 1 & 1 & 2 & 2 \\
$V(n+5)$ & 3 & 3 & 4 & 5 & 5 \\
$V(n+10)$ & 5 & 6 & 6 & 7 & 8 \\
$V(n+15)$ & 8 & 9 & 9 & 10 & 10 \\
$V(n+20)$ & 10 & 11 & 11 & 12 & 13\\
$V(n+25)$ & 13 & 14 & 14 & 15 & 15\\
$V(n+30)$ & 16 & 17 & 17 & 17 & 18\\
$V(n+35)$ & 18 & 19 & 19 & 20 & 20\\
$V(n+40)$ & 20 & 21 & 21 & 22 & 23\\
$V(n+45)$ & 23 & 24 & 24 & 25 & 25\\
$V(n+50)$ & 26 & 27 & 27 & 27 & 28\\
\hline
\end{tabular}
\end{table}
\end{document}