Probability of birthday chain Let $B(k,n)$ be the probability that a consecutive birthday chain of length $k$ can be found in $n$ people, excluding leap days and assuming that December 31 and January 1 are consecutive. After some calculations, I found that (formulae marked with * are found by myself after original question asked; formulae marked with ** are found in other answers):

$B(n,n)=\dfrac{n!}{365^{n-1}}, B(n-1,n)^*=\dfrac{n!(-n+729)}{2\times365^{n-1}},\\ B(n-2,n)^*=\dfrac{n!(3n^2-4379n+1598698)}{24\times365^{n-1}},\\ B(2,n)^{**}=1-\dfrac{1}{365^{n-1}}\displaystyle{\sum_{k=1}^{n}\dfrac{1}{k!}(\prod_{i=1}^{k-1}(365-k-i))(\sum_{j=0}^{k-1}(-1)^j\dfrac{k!}{j!(k-j)!}(k-j)^n})$
$B(k,n)=0$ if $k&gt;n$
$B(k,n)*365^{n-1}=\begin{bmatrix}1&amp;365&amp;133225&amp;48627125&amp;17748900625&amp;6478348728125&amp;2364597285765625\\0&amp;2&amp;2178&amp;1576910&amp;948848970&amp;512466548222&amp;257645853120138\\0&amp;0&amp;6&amp;8700&amp;7884390&amp;5716075620&amp;3625913148606\\0&amp;0&amp;0&amp;24&amp;43440&amp;47175960&amp;39848163600\\0&amp;0&amp;0&amp;0&amp;120&amp;260280&amp;329320320\\0&amp;0&amp;0&amp;0&amp;0&amp;720&amp;1819440\\0&amp;0&amp;0&amp;0&amp;0&amp;0&amp;5040\\\end{bmatrix}$

However, I wasn't able to find the general form of $B(k,n)$. How can I generalize this probability?
Reference:

Consecutive birthdays probability
(Choose $k$ people out of $n$ people)$\times$(choose a particular day $d$ from $365$ days)$\times$(number of ways these $k$ people can have birthdays on days $d,d+1,\cdots,d+k-1$)$\times$(number of possible birthdays for the other $n-k$ people, with either no birthdays on $d-1$ or no birthdays on $d+k$)
$$=\binom{n}{k}\times\binom{365}{1}\times k!\times\left(\binom{2}{1}364^{n-k}-363^{n-k}\right)$$
Hence $$P(k,n)=\frac{\frac{n!}{(n-k)!}\times\left(2\times364^{n-k}-363^{n-k}\right)}{365^{n-1}}$$
Obviously here $k\le365$.
The first result is more than doubtful, since $\frac{n!}{365^{n-1}}&gt;1$ for $n\gg1$.