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(n-3,n)^*=\dfrac{n!(-n^3+2192n^2-1602349n+390615698)}{48\times365^{n-1}},\\ B(n-4,n)^*=\dfrac{n!(15n^4-43890n^3+48180125n^2-23517139722n+4306546085848)}{5760\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})$ (Note: all above formulas of the form $B(n-k,n)$ is only applicable for $n\geq2k+1$)
- $B(k,n)=0$ if $k>n$
- Non-trivial values: $B(3,6)=\frac{5716075620}{6478348728125},B(3,7)=\frac{3625913148606}{2364597285765625},B(3,8)=\frac{2102766321011580}{863078009304453125},\\B(4,8)=\frac{28850283423864}{863078009304453125},B(3,9)=\frac{1143143305602772486}{315023473396125390625},B(4,9)=\frac{18799017437778480}{315023473396125390625}$
However, I wasn't able to find the general form of $B(k,n)$. How can I generalize this probability?
Reference: