# Why does the number 312213 follow the number211213 [duplicate]

In a number sequence of 1, 11, 21, 1112, 3112, 211213, why is the next number 312213?

## marked as duplicate by JonTheMon, Deusovi♦, Mike Earnest, f'', WillMay 11 '16 at 18:28

• This is a classic question, follow the link above. – Block May 11 '16 at 15:37
• It's not an exact duplicate, but it is a duplicate of a question that was closed as a duplicate of that one. – f'' May 11 '16 at 18:22
• Go here at $5$:$33$, youtube.com/watch?v=r5P-f5arPXE – Mr Pie May 4 '18 at 7:08

You sort the digits first, then count left to right. So $211213$ sorted is $111223$ which has
$3$ $1$s,
$2$ $2$s and
$1$ $3$ which gives the next number $312213$