# Linebreak inside multicolumn [duplicate]

I have the following problem I want to create a table that use a \multicolumn, I want the following

but I have this.

This is the code that I'm using, Does anyone know how to do this?

\begin{longtable}{| p{5cm} | p{5cm} | p{5cm} |}
\hline
Número & Compuesto & Primo \\
\hline
124 & X & - \\
\hline
\multicolumn{3}{ p{15cm} }{167149925598414533584400563496249196484626567023954743572719464788289404566848180320469925318728110574074739762450403911375568454294210806669447761437579390493214133578688918826283772069691256544127325402936461605210931966803891178446234431626664000699233882131687123515785136485929356311218831711685861511    }\\
\hline
\end{longtable}

• Welcome to TeX.SX! Perhaps the seqsplit package can help, see Wrapping long lines that contain no spaces – Torbjørn T. Nov 1 '15 at 18:04
• Is LaTeX supposed to determine the three line break points on its own (if so, how?), or do you plan to provide explicit guidance? – Mico Nov 1 '15 at 18:13
• I want that Latex determine the line breaks, it is not necesary three . – Ciro Iván Garcia Nov 1 '15 at 19:15

The problem is not caused by the table or multicol but simply by the fact that LaTeX doesn't know how to split the extremely long number you gave it. I suggest using the package seqsplit, designed for typesetting DNA sequences.

\usepackage{seqsplit}

...

\begin{longtable}{| p{5cm} | p{5cm} | p{5cm} |}
\hline
Número & Compuesto & Primo \\
\hline
124 & X & - \\
\hline
\multicolumn{3}{| p{15cm} |}
{\seqsplit{167149925598414533584400563496249196484626567023954743572719464788289404566848180320469925318728110574074739762450403911375568454294210806669447761437579390493214133578688918826283772069691256544127325402936461605210931966803891178446234431626664000699233882131687123515785136485929356311218831711685861511}}\\
\hline
\end{longtable}