Question: > 
> If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? 
> 
> 
> 

I've made a solution but I'm not sure it's the correct answer. Here is my solution: 
$$3\binom{10}5=756$$
$$756756 - 756 = 756000$$

Answer: 
Here is an approach in terms of generating functions:

Write $x$ for a blue, $y$ for a red, and $z$ for a black pen. An admissible arrangement looks as follows: 
$$\underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ ,$$
whereby the six slots have to filled in with ixes and ypsilons. A single slot can be filled with
$$1\ ,\ x,\ y ,\ xy,\ yx,\ xyx,\ yxy,\ xyxy,\ yxyx,\ xyxyx,\ \ldots\ ,\tag{1}$$
whereby the empty filling $1$ is excluded in the four central slots. The sum of all the terms appearing in $(1)$ computes to
$${(1+x)(1+y)\over1-xy},\quad{\rm resp.}\quad{x+y+2xy\over1-xy}\ ,$$
whereby the second expression results if $1$ is excluded. If we now compute
$$p(x,y):=\left({(1+x)(1+y)\over1-xy}\right)^2\left({x+y+2xy\over1-xy}\right)^4$$
then we obtain a term $x^r y^s$ with coefficient $1$ for each arrangement of pens containing $r$ ixes, $s$ ypsilons, and exactly five zeds, no adjacent letters being equal. We need the coefficient of the term $x^5y^5$ in $p$. To this end we write
$$p(x,y)=(1+x)^2(1+y)^2(x+y+2xy)^4\sum\_{k=0}^3{5+k\choose k}(xy)^k\ +{\rm terms\ of\ degree}>10\ .$$
Mathematica computed for me the coefficient of $t^{10}$ of the function
$$f(t)=p\_\*(t x,t y)$$
(the star reflects the truncation of the higher terms). The result was
$$21 x^8 y^2 + 806 x^7 y^3 + 4315 x^6 y^4 + 7188 x^5 y^5 + 
 4315 x^4 y^6 + 806 x^3 y^7 + 21 x^2 y^8\ ,$$
giving $7188$ as answer to the original question.
OEIS sequence A110706 which gives a reference for the recurrence relation $$n(n+1)a\_n=(n+1)(7n-4)a\_{n-1}+8(n-2)^2a\_{n-2}$$ It is easy to get $a\_1=6,a\_2=30$ and then we can easily get $a\_3=174,a\_4=1092,a\_5=7188$. Note that the symmetry from permuting colours: $a\_n$ is 6 times the number starting with blue, red.