On the number of arrangements Given positive whole number $N$,
in how many ways can I make a subset from $1$s and $3$s to $N$ , such that the sum of these numbers equals $N$.
For example , for $N = 4$, we have
{1,1,1,1},{1,3},{3,1}

so the answer is $3$.
 A: This is the coefficient of $x^N$ in the series
$$\frac{1}{1-x-x^3}$$
This is because the number of such arrangements with $m$ terms is the coefficient of $x^N$ in $(x+x^3)^m$, and this is the sum of all of these.
Plugging this into Wolfram Alpha results in a terrible formula involving the roots of the polynomial, which comes from a partial fraction decomposition, from which it is not at all clear that it is a positive integer, but you could say this is a formula for it.
Wolfram Alpha can do specific numbers, though. Plugging in $50$, we get

SeriesCoefficient[1/(1-x-x^3),{x,0,50}]

$$122106097$$
A: You are counting the finite sequences $(x_k)_{k\geq1}$ with $x_k\in\{1,3\}$, and having a given sum $N$. Let $a_N$ be the number of such sequences. Then
$$a_0=a_1=a_2=1\ .$$
Furthermore we have the following recursion:
$$a_n=a_{n-1}+a_{n-3}\qquad(n\geq3)\ ,\tag{1}$$
because we can begin a sequence with $1$ or with $3$ and then append an arbitrary sequence with sum $n-1$, resp., $n-3$. The characteristic equation $\lambda^3-\lambda^2-1=0$ of $(1)$ has the solutions
$$-0.232786 \pm 0.792552 i,\qquad \lambda_0:=1.46557\ .$$
As the first two roots have absolute value $<1$ we can say that $$a_N\approx C\>\lambda_0^N\qquad(N\gg1)$$
for some positive constant $C$.
