What is the way to solve the following kinds of problem:
Give coins of 2, 4, 6 find a number of ways to get n as a sum.
Say n = 6
We can get n = 6 answer is 4.
[2, 2, 2], [2, 4], [4, 2] , [6]
For a small number, I can solve it simple factorization but for large numbers this approach is not feasible.
@JMoravitz's comment is correct: the result can be obtained by looking at a particular coefficient in the generating function.
Alternatively, since the order in which the coins were used is important in your problem, you can solve the homogeneous recurrence $f(n) = f(n-2) + f(n-4) + f(n-6)$ with initial conditions $f(0)=1$ and $f(k)=0$ for $k<0$.
Here is the Python code I used to make the table above.