Consider partitions where every summand has a factor in common with its neighbors and only $x_n$ can be one:
$$x_0 x_1 + x_1 x_2 + x_2 x_3 + \cdots + x_{n-1} x_n = N \qquad x_i \in \mathbb{N}$$
Example $($apart from the trivial case $N \cdot 1 = N)$
$$15 = 2 \cdot 5 + 5 \cdot 1 = 4 \cdot 3 + 3 \cdot 1 = 3 \cdot 3 + 3 \cdot 2 = 3 \cdot 2 + 2 \cdot 3 + 3 \cdot 1$$
How can these partitions be generated efficiently by a program? I currently generate all permutations of the partitions of a number and then check for common divisors between neighbors (after first discarding all partitions with multiple primes or ones).
Furthermore, can we estimate the number of such partitions for a given $N$?
Thanks in advance.
This recursive program returns the $x_i$s in a list: