Algorithm leading to an exact answer:
First, you must find a closed form formula for $~f(n) = ~$ the probability that there is at least one occurrence of three people sharing the same birthday, given that there are exactly $~n~$ people in the room.
Then, it becomes a simple matter of using computer assistance to determine the smallest value of $~n,~$ such that $~f(n) \geq 1/2.$
So, the entire problem reduces to deriving the closed form formula for $~f(n).$
$f(n)~$ will be expressed as
$$f(n) = 1 - \frac{N}{D} ~: ~D = 365^n,$$
where $~N~$ denotes the number of equally likely ways that you can have no occurrence of 3 people sharing the same birthday.
Given $~n~$ fixed, and $~\displaystyle p \in \left\{ ~0, ~1, ~2, ~\cdots, ~\left\lfloor \frac{n}{2} ~\right\rfloor ~\right\}, ~$
let $~g(n,p)~$ denote the number of ways that you can have exactly $~p~$ pairs of people, where the two people in each pair have the same birthday, but no one else in the room has that birthday.
Then
$$N = \sum_{p = 0}^{\left\lfloor \frac{n}{2} ~\right\rfloor} g(n,p),~$$
so the entire problem reduces to providing a closed form formula for $~g(n,p).$
To compute $~g(n,p):$
There are $~\displaystyle \frac{n!}{2^p \times (n-2p)! \times p!} ~$ distinct ways of forming the $~p~$ pairs of people.
The denominator's $~p!~$ factor is used to accommodate the fact that the order that the pairs are formed is irrelevant.
You can construe each of the $~p~$ pairs of people as one fused unit, that will be assigned one birthday. So, instead of having $~n~$ units, you have $~n - p~$ units, each of which are assigned a birthday.
The number of distinct assignments is therefore
$~\displaystyle \frac{365!}{(365 + p - n)!}.$
Therefore,
$$g(n,p) = \frac{n!}{2^p \times (n-2p)! \times p!} \times \frac{365!}{(365 + p - n)!}.$$
$$\underline{\text{Final Summary}}$$
Use computer assistance to determine the smallest value of $~n~$ such that $~f(n) \geq \dfrac{1}{2}.$
$$f(n) = 1 - \frac{N}{D} ~: ~D = 365^n.$$
$$N = \sum_{p = 0}^{\left\lfloor \frac{n}{2} ~\right\rfloor} g(n,p).$$
$$g(n,p) = \frac{n!}{2^p \times (n-2p)! \times p!} \times \frac{365!}{(365 + p - n)!}.$$