You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

求解递推序列$a_{n}=n \cdot (a_{n-1}+a_{n-2})$的闭式表达式

求解递推序列$a_{n}=n \cdot (a_{n-1}+a_{n-2})$的闭式表达式

Hey there! It's awesome that you and your friends are digging into this fun, non-textbook recurrence relation—let's break it down together.

First, let's start by computing the first few terms to spot patterns and get a feel for the sequence:

  • $a_0 = 2$
  • $a_1 = 3$
  • $a_2 = 2(3+2) = 10$
  • $a_3 = 3(10+3) = 39$
  • $a_4 = 4(39+10) = 196$
  • $a_5 = 5(196+39) = 1175$

Simplifying the Recurrence

A handy trick for recurrences with factorial-like growth is to define a new sequence $b_n = \frac{a_n}{n!}$. Substituting this into the original recurrence:
$$
\frac{a_n}{n!} = \frac{n(a_{n-1} + a_{n-2})}{n!}
$$
Simplify the right-hand side to get a cleaner relation:
$$
b_n = b_{n-1} + \frac{b_{n-2}}{n-1}
$$
With initial conditions $b_0 = \frac{a_0}{0!} = 2$ and $b_1 = \frac{a_1}{1!} = 3$. This makes the recurrence easier to work with, but it's still a variable-coefficient relation—so no quick characteristic equation solution here.

Closed-Form Reality Check

Unfortunately, this recurrence doesn't have a simple closed-form expression using elementary functions (polynomials, exponentials, trigonometric functions, etc.). Here's why:

  1. Variable coefficients: Unlike constant-coefficient recurrences (which we can solve with characteristic equations), variable-coefficient linear recurrences rarely have elementary solutions unless they fit a specific special function framework.
  2. Differential equation connection: If we define the generating function $G(x) = \sum_{n=0}^\infty b_n x^n$, we can derive a second-order linear differential equation for $G(x)$:
    $$
    (1-x)G''(x) - (x+2)G'(x) - 2G(x) = 0
    $$
    This equation doesn't map to any standard elementary differential equations, and its solution requires non-elementary special functions or infinite series.

Useful Alternatives to Elementary Closed Form

While we don't have a simple elementary solution, we can express $a_n$ in practical, meaningful ways:

  • Summation form: By expanding the recurrence for $b_n$, we can write:
    $$
    b_n = 3 + \sum_{k=2}^n \frac{b_{k-2}}{k-1}
    $$
    Substituting back $a_n = n! b_n$ gives a summation-based expression for $a_n$, which is often considered a valid closed form when elementary solutions don't exist.
  • Asymptotic behavior: For large $n$, the sequence grows roughly like $a_n \sim C n! e^n$ (where $C$ is a constant you can approximate from initial terms). This is useful if you care about how the sequence scales as $n$ gets big.
  • Sequence properties: The integer sequence $a_n$ (2, 3, 10, 39, 196, 1175, ...) is cataloged in integer sequence databases, where you can find additional recurrence variants, combinatorial interpretations, and more if you're curious.

Final Thoughts

It's totally normal that this non-textbook problem doesn't have a simple elementary closed form—many interesting variable-coefficient recurrences don't. Your best bets are to work with the summation form, use generating functions for analysis, or explore the asymptotic growth if that's useful for your work. Keep exploring!

备注:内容来源于stack exchange,提问作者Emil

火山引擎 最新活动