solutions for Diophantine equation for ${k_1} + 2{k_2} + 3{k_3} + .... + n{k_n} = n$ Consider the Diophantine equation of the form
${k_1} + 2{k_2} + 3{k_3} + .... + n{k_n} = n$, where ${k_1},{k_2},...{k_n} \in Z^+$ .
For a given $n$, how can I obtain the solutions of a given equation? For example for $n=2$ the solutions are
$k_1=2,k_2=0$ and $k_1=0,k_2=1$.
 A: There are some ways to solve a Diophantine equation. The main solving algorithm concentrating on reducing the dimensions of the problem in both number of variables and scale of coefficients to get into a simple equation. When the simple equation has been solved, backwards the steps and find the solution of main equation.
For example, consider the following Diophantine equation:
$$k_1 + 2 k_2 + 3k_3 = 3 $$
Consider $$k_1 = x_1 – k_2 – 2k_3$$
Then we have
$$x_1 + k_2 + k_3 = 3$$
Again consider $$k_2 = x_2 – k_3 $$
Gives this
$$x_1 + x_2 = 3$$
Solving this equation is easy
\begin{cases}
x_1 = t \\
x_2 = 3-t
\end{cases}
$t$ is an arbitrary integer.
Then we go one step backward 
$$k_2 = x_2 – k_3$$
We have no restriction on $k_3$, so $k_3 = s$.
$$k_2 = 3-t – s$$
Then we can obtain $k_1$
$$k_1 = x_1 – k_2 -2k_3 = t - (3 – t – s ) – 2 s  = 2t – s – 3$$
So the solution is
$$(k_1, k_2, k_3) = (2t-s-3, 3-t-s,s) ;  \quad\forall s,t\in\mathbb Z$$
$s,t$ are arbitrary integers.
We can get solutions to positive integers just by apply restrictions to final 
solution.
$$s = 1,t=2 \implies (k_1, k_2, k_3) = (1,1,0)$$

But this is the primary solution algorithm.when we want to solve a bigger Diophantine equation we just need more variables to represent the final solution form, for Diophantine equation with n variables we need n-1 variable to represent the final solution and when our goal is to find the positive integer solutions we get to a mass number of limitations that is really hard to overcome.
Here's the second approach arrives, extensive and special case solution to positive integers.this approach instead of compacting to a simple equation form, try to decompose equation to parts that are isolated from each other and result to some smaller equations and especially is best for solutions in positive integer domain with application related to electronics and communications.my thesis was about design modern approaches algorithms to equations and implementation on devices.
This is part of my thesis that I worked hard on the algorithms on it.It's my pleasure to answer your request and send my work to share my knowledge and ideas.
you can contact me by Boehner.john[at]usa.com
Best regards
A: Assuming solutions in $\mathbb{N}$, this is just the problem of partitions of integers;  $k_1$ is the number of 1's in the partition, $k_2$ the numbers of 2's, and so forth.  I don't believe a closed-form expression for the number of partitions of a given integer exists, though recursive algorithms exist to generate all the partitions of a given integer.  See the above link or this one, for example.
