1

EDIT: The vectors can be any length. That is $k$ is not fixed.

For a given natural number $n$, let $S_1(n)$ be the number of vectors $(a_1, a_2, \ldots, a_k)$ such that

$$a_1 + a_2 + \cdots + a_k = n$$

where each $a_i$ is an odd natural number. What is the value of $S_1(n)$? Is there a closed form solution?

A Variation

Suppose we relax the condition on vectors so that all $a_i$ must be odd except $a_1$ and $a_k$, which can be either even or odd. Call the number of such vectors $S_2(n)$. What is the value of $S_2(n)$? Is there a closed form solution?

Notes

This question was inspired by a recent post by phoenix, where we are asked a question about vectors. I have figured out some bounds for $SO$ in that post. In particular, it is between $\sqrt{2^{n - 1}}$ and $2^{n - 1}$. Note that $2^{n - 1}$ is the number of vectors adding to $n$ without the odd restriction.

Pang
  • 399
  • 5
  • 8
Colm Bhandal
  • 4,649
  • What do you mean by $SO'(n)$, as $SO$ is only defined on the natural numbers (not continuous), there is no traditional derivative. Also, "Ordered" is not how you want to describe this sum, or any sum, as addition is commutative. – Mark Jul 25 '15 at 20:50
  • I think it's sensible to ask about "ordered sums" as shorthand for "finite sequence with a given sum" (and satisfying some other conditions as here): We really might want to count $1 + 3$ and $3 + 1$ as distinct decompositions, so that $SO(4) = 3$ and not $2$. – Travis Willse Jul 25 '15 at 20:54
  • 1
    (Also, the notation $SO(n)$ has a well-established, universal meaning, namely the special orthogonal group, so it's probably better to use another symbol.) – Travis Willse Jul 25 '15 at 20:55
  • 1
    We get, yet again, the Fibonacci numbers. – André Nicolas Jul 25 '15 at 21:02
  • @Travis, notation changed to avoid confusion. – Colm Bhandal Jul 25 '15 at 21:11
  • @Mark, notation changed to avoid confusion. Also I used "ordered" to refer to the fact that 3 + 1 and 1 + 3 are different objects. – Colm Bhandal Jul 25 '15 at 21:12
  • @AndréNicolas, I see it now. Thanks. – Colm Bhandal Jul 25 '15 at 21:17

3 Answers3

3

Let $a_n$ be the number of compositions of $n$ into odd parts. Note that $a_1=a_2=1$. Because the last entry in the sum is $1$ or $3$ or $5$ and so on, the $a_i$ satisfy the recurrence $$a_{n+1}=a_n+a_{n-2}+a_{n-4}+\cdots.$$

This recurrence is also satisfied by the Fibonacci numbers. For from $b_{i+1}=b_i +b_{i-1}$ we obtain $b_{n+1}=b_n+b_{n-1}=b_n+b_{n-2}+b_{n-3}=b_n+b_{n-2}+b_{n-4}+b_{n-5}$ and so on.

Same recurrence, same initial conditions: The sequence $(a_n)$ is the Fibonacci sequence. Fibonacci counts again!

Remark: For the sake of full disclosure, I should mention that I first computed the $a_k$ up to $k=6$ and only found the simple argument after that.

André Nicolas
  • 507,029
  • And it even works for the relaxed condition too: Becuase we get four cases for the first and last terms, based on whether they're even or odd. So we get $F_{n - 2} +2 F_{n - 1} + F_{n} = F_{n + 2}$. Thank you for the insight. – Colm Bhandal Jul 25 '15 at 21:55
  • You are welcome. Nice observation. – André Nicolas Jul 25 '15 at 21:57
  • @AndreNicolas- do you think the Fibonnaci sequence is also the solution to the related question: https://math.stackexchange.com/questions/1373679/how-many-different-sums-of-parts-of-a-vector/1373691#1373691? – Colm Bhandal Jul 25 '15 at 22:00
  • I do not know, so far have only scanned that problem. – André Nicolas Jul 25 '15 at 22:02
0

The number of ways to write $n$ as a sum of $k$ odd numbers is trivially given by the coefficient of $x^n$ in: $$ \left(x+x^3+x^5+\ldots\right)^k = \left(\frac{x}{1-x^2}\right)^k $$ so it equals the number of ways to write $n-k$ as a sum of $k$ even numbers, that is: $$ \left\{\begin{array}{rcl}0 & \text{if} & n-k\equiv 1\pmod{2}, \\ \binom{\frac{n-k}{2}+k-1}{k-1} & \text{if} & n-k\equiv 0\pmod{2},\end{array}\right. $$ since: $$ \frac{1}{(1-x)^k}=\sum_{m\geq 0}\binom{m+k-1}{k-1}x^m.$$

Jack D'Aurizio
  • 353,855
  • Thanks for this. I was actually looking for all sums for all possible $k$, which was answered in the comments. So it could be the sum of all those possible terms from $k = 1$ up to $n$. Anyway the answer turned out to be the Fibonnaci numbers. – Colm Bhandal Jul 25 '15 at 21:46
0

If $a_j$ is an odd natural number, then there exists a nonnegative integer $b_j$ such that $a_j = 2j + 1$. Hence, if $a_1 + a_2 + \cdots + a_k = n$ then substitution yields \begin{align*} 2b_1 + 1 + 2b_2 + 1 + \cdots + 2b_k + 1 & = n\\ 2b_1 + 2b_2 + \cdots + 2b_k & = n - k\\ b_1 + b_2 + \cdots + b_k & = \frac{n - k}{2} \tag{1} \end{align*} Equation 1 is an equation in the nonnegative integers. The number of solutions is the number of ways we can insert $k - 1$ addition signs in a row of $(n - k)/2$ ones, which is $$\binom{\frac{n - k}{2} + k - 1}{k - 1}$$

N. F. Taussig
  • 76,571
  • Thank you for this. But I was actually talking about any $k$, not a particular $k$. Perhaps I should use more quantifiers next time. – Colm Bhandal Jul 25 '15 at 21:56