You have to find the least common multiple of the packages of pens - for blue, you can buy packages of 6, for black, you can buy packages of 3 and for green, you can buy packages of 2. The least common multiple of 6, 3 and 2 is 6, because 6x1 = 6, 3x2 = 6 and 2x3 = 6.

So to get equal number of each color pen, you need 1xpackage of 6 blue pens, 2xpackages of 3 black pens and 3xpackages of 2 green pens.

Therefore, the least number of packages you need is 1 + 2 + 3 = 5 packages.