birthday probability problem in a random variable flavor A flavor of the birthday problem is worded this way: repeatedly ask people for their birthdays until you find a repeated birthday, and let the number of people be a random variable $X$. 
I am confused about how is this problem different from asking the probability of $2$ people having a same birthday among $n$ people, if they are different? 
And is the probability mass function just$(X-1)/365$?
 A: I interpret the problem statement this way: suppose you start asking people
their birthdays. You ask this question of $9$ people one after the other
but do not yet find any two people with the same birthday.
Now you ask a $10$th person, and you now have found two people to have the same birthday.
In this example, $X=10$, because you had to ask $10$ people in order to find
two matching birthdays.
What does that tell you about the relationship of the first nine birthdays to each other?
What does it tell you about the relationship of the tenth birthday to the other nine?
You should be able to figure out $P(X=10)$ from those relationships,
then generalize so that you have a formula for $P(X=n)$.
A: This is not an answer, but maybe a list of useful hints:
(a) What is the support of X (the list of integers for which X has positive probability)? (b) What is the probability of a match if you interview only 2 people? (c) What is the probability of a match if you interview only 3 people. (d) From the previous, how can you deduce P{X = 2} and P{X = 3}?
In case you're into simulations as a reality check on combinatorial solutions, the R code below gives roughly approximate answers and makes a nice graph.


m = 10^5;  x = numeric(m);  n = 366
for(i in 1:m) {
  b = sample(1:365, 366, rep=T);  d = duplicated(b)
  x[i] = match(T, d)  }  # location of first birthday match
round(table(x)/m, 4);  plot(table(x)/m, type="h")


A: In the traditional birthday problem, we have the following likelihood function where $N$ is the number of people in the room, and $D=365$ is the number of possible birthdays:
$$p(N) = \prod_{i=1}^N\big(1 - \frac{i-1}{D}\big) = D^{-N}\prod_{i=1}^N\big(D - i + 1\big) = D^{-N}\cdot \frac{D!}{(D-N)!}$$
Notice in this new 'flavor' of the problem, we are not calculating the raw probability, but we can approximate the likelihood by interviewing people until we have found a duplicate.  
If we allow $X_i$ be the observed birthday date of the $i$th interview (ex: January $5$th) and we interview people such that we assign $K$ to be the first interview to produce a duplicate, it can be shown that the following recursive relation
$$P(K+1) = P(X_{K+1}\in\bigcup_{i=1}^KX_i)\cdot(1-P(K))= \frac{K}{D}\big(1 - P(K)\big),\ P(2)=\frac1D$$
Gives way to the expression below
$$P(K+1) = \frac{K}{D^{K}}\cdot\big(\sum_{j=0}^{K-1} \frac{(K-1)!}{j!} D^j(-1)^{K+j-1}\big)\text{ for }D>K>2$$
I want to push this a little further and see what connections can be made between this expression and the original, but I'm a little short on time. Thought I'd place here in case anyone else wants to run with it.
