Is this what you want? Set d=366 to include possible Feb 29. Table example goes to n=23, can expand to 366.
In[1]:= P2[n_, d_] := 1 - d!/((d - n)! d^n)
In[2]:= P2[23, 366] // N
Out[2]= 0.506323
In[3]:= Do[Print[n, " ", N[P2[n, 366]]], {n, 1, 23}]
1 0.
2 0.00273224
3 0.00818179
4 0.0163114
5 0.0270621
6 0.0403536
7 0.0560856
8 0.0741386
9 0.094376
10 0.116645
11 0.140781
12 0.166604
13 0.193929
14 0.22256
15 0.252298
16 0.282941
17 0.314288
18 0.346138
19 0.378295
20 0.41057
21 0.442779
22 0.474751
23 0.506323