0%

Problem 709


Problem 709


Even Stevens

Every day for the past $n$ days Even Stevens brings home his groceries in a plastic bag. He stores these plastic bags in a cupboard. He either puts the plastic bag into the cupboard with the rest, or else he takes an even number of the existing bags (which may either be empty or previously filled with other bags themselves) and places these into the current bag.

After $4$ days there are $5$ possible packings and if the bags are numbered $1$ (oldest), $2$, $3$, $4$, they are:

  • Four empty bags,
  • $1$ and $2$ inside $3$, $4$ empty,
  • $1$ and $3$ inside $4$, $2$ empty,
  • $1$ and $2$ inside $4$, $3$ empty,
  • $2$ and $3$ inside $4$, $1$ empty.

Note that $1$, $2$, $3$ inside $4$ is invalid because every bag must contain an even number of bags.

Define $f(n)$ to be the number of possible packings of $n$ bags. Hence $f(4)=5$. You are also given $f(8)=1\ 385$.

Find $f(24\ 680)$ giving your answer modulo $1\ 020\ 202\ 009$.


伊文·“偶数”·史蒂芬斯

过去$n$天中的每一天,伊文·“偶数”·史蒂芬斯都会将当天购买的杂货装在一个塑料袋里带回家。他把这些塑料袋存放在碗橱里,每次他要么将新的塑料袋直接单独放进去,要么先从碗橱里取出偶数个塑料袋(可以是空的,也可以是装有其它的塑料袋的)装进新塑料袋,再把新塑料袋放进去。

举个例子,假如过去了$4$天,碗橱中有编号依次为$1$、$2$、$3$、$4$的袋子,那么这些袋子可能的状态共有$5$种,分别是:

  • 四个空袋子;
  • $1$号和$2$号袋子在$3$号袋子中,$4$号袋子是空的;
  • $1$号和$3$号袋子在$4$号袋子中,$2$号袋子是空的;
  • $1$号和$2$号袋子在$4$号袋子中,$3$号袋子是空的;
  • $2$号和$3$号袋子在$4$号袋子中,$1$号袋子是空的。

注意$1$号、$2$号和$3$号袋子都在$4$号袋子中的状态不可能出现,因为每个袋子中只能装有偶数个袋子。

记$f(n)$为$n$个袋子可能的状态,因此$f(4)=5$。已知$f(8)=1\ 385$。

求$f(24\ 680)$并将你的答案对$1\ 020\ 202\ 009$取余。