I looked online, and found more than one and inconsistent answers to the Birthday Paradox when we throw the leap year into the mix. None of the answers I saw match with my own. I am posting my solution to see if it is correct, or if I am missing something.
Question:
Assume that the leap year occurs every four years. (i.e. ignore the 100 and 400 year rule). Also assume that the number of people born each day is the same. What is the probability that in a group of $n$ people (each one selected randomly), no two people share the same birthday?
My Solution:
Let $\mathcal{D}$ be the set of all possible dates in an year. (Thus $\mathcal{D}$ contains 366 elements. Note that these possibilities are not equally likely, since a person is four times as likely to be born on (say) Jan 1 than on Feb 29. This is true for any given day other than Feb 29, and it is encoded in the probability assignments given below.)
Now probability that a randomly selected person is born on Feb 29 is $\frac{1}{1 + 4 \times 365} = \frac{0.25}{365.25}$.
Also, the probability that a randomly selected person is born on a given day other than Feb 29 is $\frac{1}{365.25}$.
Now, for a group of $n$ randomly selected people, the Sample Space of birthdays is $\mathcal{D}^n$. Let $\mathcal{A} \subset \mathcal{D}^{n}$ be the subset such that no two people share the same birthday.
Divide $\mathcal{A}$ into two disjoint sets $\mathcal{A}_1$ and $\mathcal{A}_2$ such that
$\mathcal{A}_1 = \{\xi: \xi \in \mathcal{D}^n \text{ and no two people have same birthday, and none is born on Feb 29} \}$, and
$\mathcal{A}_2 = \{\eta: \eta \in \mathcal{D}^n \text{ and no two people have same birthday, and exactly one is born on Feb 29} \}$
Now, $\mathbb{P}(\xi) = \frac{1}{(365.25)^n}$ for each $\xi \in \mathcal{A}_1$, and $\mathbb{P}(\eta) = \frac{0.25}{(365.25)^n}$ for each $\eta \in \mathcal{A}_2$.
Also, $|\mathcal{A}_1| = \; ^{365}P_{n}$, and $|\mathcal{A}_2| = \; n \; \cdot \; ^{365}P_{n-1}$
Finally, $\mathcal{A}_1$ and $\mathcal{A}_2$ being disjoint, it follows that
$$\mathbb{P}(\mathcal{A}) = \mathbb{P}(\mathcal{A}_1) + \mathbb{P}(\mathcal{A}_2) = \frac{^{365}P_{n}}{(365.25)^n} + \frac{0.25 \; \cdot \; n \; \cdot \; ^{365}P_{n-1}}{(365.25)^n}$$
PS:
As usual, if you want to find out the probability that at least two people share the same birthday then you would calculate $1 - \mathbb{P}(\mathcal{A})$. Interestingly, the number of people required so that this probability is more than 0.5 is still $n = 23$, same as the birthday paradox without leap year.
Please let me know if the solution above looks accurate.
Answer below is mildly flawed, because I originally incorrectly computed $N_1$. This caused me to doubt OP's answer. With (my) flaw corrected, the OP's math looks good, and my only qualm of the OP's work is:
Having a sample space of 366 elements is not really a good approach, since the elements are not equally likely.
As indicated by the comment of J Moravitz, it is best to work with integers, rather than (for example) a denominator of $(365.25)^n.$
Another minor issue is that while the OP's math is correct, he approached it by examining the probability of various events occurring. In problems like this, I think that it is better to approach it as
$$\frac{\text{Number of pertinent possibilities}}{\text{Number of total possibilities}}.$$
Anyway, given the original flaw in my thinking, I've left the flawed work intact, with the edit-patch pasted on as an example of my moderately going off the rails.
No, it's not correct. In my opinion, the first comment of J Moravitz should be followed. Therefore, your notion of a sample space of $\mathcal{D}^n$, where $\mathcal{D} = 366$ is not tenable.
Superficially examining your math, it looks like your math is (somehow) consistent with the idea of $\mathcal{D} = 365.25$ Therefore, although your math seems hard to follow, it might be correct; it's hard for me to tell.
I would have approached it as follows:
Probability of no two people out of $n$ sharing a birthday is
$$\frac{N\text{(umerator)}}{D\text{(enominator)}}$$
where $D = (1461)^n.$
To calculate $N$ you must consider two possibilities : exactly one of the people is born on Feb 29, or none of the people is born on Feb 29.
Case-1
Without loss of generality, you can assume that Person-1 was born on Feb 29, and none of the other $(n-1)$ people were.
The number of ways that this can occur is therefore
$$N_1 = 1 \times (1460) \times (1456) \times \cdots \times (1468-4n).$$
Edit
Just realized that this is wrong. Because the denominator is $(1461)^n$ the consistent enumeration of the numerator requires that order be regarded as important. Therefore, I can not assume that Person-1 was the person born on Feb 29. Therefore, the above computation of $N_1$ must be multiplied by the $\binom{n}{1}$ scalar.
The intuition is therefore: there are $\binom{n}{1}$ ways of choosing which person was born on Feb 29. Having chosen this person, you can then line up the other $(n-1)$ people in a row, regarding them as Person-2, Person-3, ..., Person-n.
Then, there are $1460$ possible days to assign to Person-2. Then, once this assignment is made, there are $1456$ possible days to assign to Person-3, and so forth. This type of enumeration is consistent with the enumeration of $D = (1461)^n$, where (for example) Person-A on Jan 1 --- Person-B on Jan 2 is deemed distinct from Person-A on Jan 2 --- Person-B on Jan 1. So the revised enumeration is :
$$N_1 = \binom{n}{1} \times (1460) \times (1456) \times \cdots \times (1468-4n).$$
Case-2
No one was born on Feb. 29.
The number of ways that this can occur is therefore
$$N_2 = (1460) \times (1456) \times (1452) \times \cdots \times (1464-4n).$$
Final Answer:
$$\frac{N_1 + N_2}{D}.$$