Odd-Run Compositions
A composition of is a sequence of positive integers which sum to . Such a sequence can be split into runs, where a run is a maximal contiguous subsequence of equal terms.
For example, is a composition of consisting of four runs:
Let be the number of compositions of where every run has odd length.
For example, :
Find . Give your answer modulo .
奇数长度分段组成
的一个组成是一个和为的正整数序列;这一序列可以进一步分成若干段,每一段是由相等的数构成的最长连续子序列。
例如,是的一个组成,可以分成四段:
令为的所有组成中,满足每一段长度都为奇数的组成的数目。
例如,:
求,并对取余作为你的答案。
Gitalking ...