# Birthday paradox for adjacent dates: exact probability

I've seen a lot of questions on here that answer the birthday paradox, e.g. the probability $n$ people in a room share the same birthday, where a year is 365 days. So I won't rehash the proof that the formula is

$$p(n) = 364/365 * 363/365 * ... * (365-(n-1)) / 365$$

But I was wondering about the exact probability $p(n)$ that two people either share the same birthday or have a birthday one day apart.

I was able to figure things roughly. Each day you choose most likely wipes out two other days, so my initial guess q(n) was

$$q(n) =~ 362/365 * 359/365 * ... * (365-3(n-1)) / 365$$