0

A similar question has been asked before but I haven't seen an answer to this specific one after looking for so long.

I have a recursive function where:

  • $P(2) = 1$
  • For $n ≥ 3$, $P(n) = (n-2)P(n-1) + 1$

Here are the set of answers for P(n) for $n ≥ 2$:

  • $\{1, 2, 5, 16, 65, 326, 1957, 13700, \cdots\}$

Here are the arithmetic progressions I've written down so far:

  • $P(3) = (1 ⋅ 1) + 1 = 1 + 1 = 2 (= 2⋅1! + 0 ????)$
  • $P(4) = (1+1)⋅2 + 1 = 2⋅2! + 1 = 5$
  • $P(5) = [2⋅2! + 1]⋅3 + 1 = 2⋅3! + 4 = 16$
  • $P(6) = [2⋅3! + 4]⋅4 + 1 = 2⋅4! + 17 = 65$

So it seems like there's a progressions with factorials, but I can't seem to put it all together. Here are my problems:

  1. I can't figure out the factorial form of $P(3)$. Does it have 0 as coefficient?

  2. The coefficients of the factorial forms $(i.e. \{1, 4, 17, 86, 517, \cdots \})$ form another recursive function of the same kind as the original.

  3. Because of $1$ and $2$, I can't put it all together into a nice, closed-form function for $n ≥ 3$.

cpresto
  • 69

1 Answers1

0

This sequence is documented at OEIS as A00522. The most elementary expression for $P(n)$ on that page is the finite sum $$P(n+2)=\sum_{k=0}^n \frac{n!}{k!}=1+n(n-1)+\cdots+n!$$ While a closed-form expression for $P(n)$ would seem desirable, none of those on the OEIS page really fulfill that criterion. For instance, there is a representation in terms of the incomplete gamma function $\Gamma(z,t)$. This amounts to the definite integral $$P(n+2)=e \Gamma(n+1,1)=\int_0^\infty e^{-x}(1+x)^n\, dz$$ But if we expand $(1+x)^n$ and integrate term-by-term we recover the same sum as above. Other formulas on that page have a similar character. So I don’t think a more useful closed-form is in the cards.

Semiclassical
  • 18,592