I got it ...

firstly the degree of $(x^p+1)^p$ is $p^2$ So the degree of $\prod_{p=1}^n (x^p+1)^p$ is
$$N=1+2^2+3^2+...+n^2=\frac{n(n+1)(2n+1)}{6}$$
now we have
$$\prod_{p=1}^n (x^p+1)^p=\sum_{p=1}^N a(n,p)x^p $$
by taking kth derivative and put $x\to0$ we get
$$\lim_{x\to0} \frac{d^k}{dx^k} \prod_{p=1}^n (x^p+1)^p=\lim_{x\to0} \frac{d^k}{dx^k}\sum_{p=1}^N a(n,p)x^p $$
But for natural $k,p$
$$\lim_{x\to0} \frac{d^k}{dx^k} x^p=0 ,p\ne k$$
So
$$\lim_{x\to0} \frac{d^k}{dx^k} a(n,k)x^k=\lim_{x\to0} \frac{d^k}{dx^k} \prod_{p=1}^n (x^p+1)^p $$
then
$$ a(n,k)=\frac{1}{k!}\lim_{x\to0} \frac{d^k}{dx^k} \prod_{p=1}^n (x^p+1)^p $$
now to find the kth derivative we need to use [General Leibniz rule][1] and get
$$ \frac{1}{k!}\lim_{x\to0} \frac{d^k}{dx^k} \prod_{p=1}^n (x^p+1)^p=\frac{1}{k!}\sum_{k_1+k_2+...+k_n=k} \binom{k}{k_1,k_2,...,k_n} \prod_{j=1}^n \lim_{x\to0} \frac{d^{k_j}}{dx^{k_j}} (x^j+1)^j$$
where
$$ \lim_{x\to0} \frac{d^{k_j}}{dx^{k_j}} (x^j+1)^j=\sum_{p=0}^j \binom{j}{p} \lim_{x\to0} \frac{d^{k_j}}{dx^{k_j}} x^{pj} $$
So it must be $k_j=pj$ which mean $\frac{k_j}{j}\in N$ or its value is zero then
$$ \lim_{x\to0} \frac{d^{k_j}}{dx^{k_j}} (x^j+1)^j=\binom{j}{\frac{k_j}{j}} k_j!f\left(\frac{k_j}{j}\right)  , 0 \leq\frac{k_j}{j}\leq j $$
where $f(x)=1$ if $x\in N$ and $f(x)=0$ if $x \notin N$

back to the formula we have
$$ a(n,k)=\frac{1}{k!}\sum_{k_1+k_2+...+k_n=k} \binom{k}{k_1,k_2,...,k_n} \prod_{j=1}^n \lim_{x\to0} \frac{d^{k_j}}{dx^{k_j}} (x^j+1)^j$$
$$ =\sum_{k_1+k_2+...+k_n=k} \frac{1}{k_1!k_2!...k_n!} \prod_{j=1}^n \binom{j}{\frac{k_j}{j}} k_j!f\left(\frac{k_j}{j}\right)$$
So
$$ a(n,k)=\sum_{k_1+k_2+...+k_n=k}\prod_{j=1}^n \binom{j}{\frac{k_j}{j}} f\left(\frac{k_j}{j}\right)$$
now put $g_j=\frac{k_j}{j}$ So
$$ a(n,k)=\sum_{g_1+2g_2+...+ng_n=k}\prod_{j=1}^n \binom{j}{g_j} f\left(g_j\right)$$
where $g_1+2g_2+...+ng_n=k$ with $0\leq g_j \leq j$ which mean $g_j\in\{0,1,2,...,j\}$ So $f(g_j)=1$ 

finally I got
$$ a(n,k)=\sum_{\substack{\sum_{j=1}^n j g_j=k \\ g_j\in\{0,1,..,j\}}}\prod_{j=1}^n \binom{j}{g_j}$$

and because of $g_j\in\{0,1,..,j\}$ then we can put $g_j\to j-g_j$ then
$$ \sum_{j=1}^n j (j-g_j)=k \to \sum_{j=1}^n j g_j=N-k $$
which mean $a(n,k)=a(N-k)$

and for the last question to prove the given series is constant function for $x$ lets define $f(x)$ and rewrite $\cos x$ as real part of $e^{ix}$ So
$$ f(x)=\Re\left(\sum_{\substack{k=0 \\ k\ne \frac{N}{2}}}^N \frac{a(n,k)}{k-\frac{N}{2}} \exp\left(2ix\left(k-\frac{N}{2} \right) \right) \right)$$
note that the case $k=\frac{N}{2}$ is real valued by using limit : $\frac{\sin(ax)}{a} , a\to 0$ , then by derivative
$$f'(x)=\Re\left(2i\sum_{\substack{k=0 \\ k\ne \frac{N}{2}}}^N a(n,k) \exp\left(2ix\left(k-\frac{N}{2} \right) \right) \right) $$
$$=-2\Im\left(e^{-iNx}\sum_{k=0}^N a(n,k) e^{2ikx}-a\left(n,\frac{N}{2}\right) \right)=-2\Im\left(e^{-iNx}\prod_{k=1}^n \left(e^{2ikx}+1\right)^k\right) $$
$$=-2\Im\left(\prod_{k=1}^n e^{-ik^2x} \left(e^{2ikx}+1\right)^k\right)=-\Im\left(\prod_{k=1}^n \left(2 \cos (kx)\right)^k \right)=0 $$
therefore $f'(x)=0$ which mean $f(x)$ is constant for $x$


  [1]: https://en.wikipedia.org/wiki/General_Leibniz_rule