Problem
COM-B1-M10-P017 Parts \(1,2,3\)
#17
★★★☆☆ Level 3 of 5
In how many ways can \(9\) be represented as a sum of \(1\), \(2\), and \(3\), if order matters?
Split by the last summand.
Let \(a_n\) be the number of ways. Then \(a_n=a_{n-1}+a_{n-2}+a_{n-3}\), with \(a_0=1\), \(a_1=1\), \(a_2=2\). We get \(a_3=4\), \(a_4=7\), \(a_5=13\), \(a_6=24\), \(a_7=44\), \(a_8=81\), \(a_9=149\).
Compositions as a recurrence.