Different Take on Birthday Problem - Exercise # 4 in “Intro to Probability” by Grinstead & Snell

There are have been 45 presidents in the US. However, Grover Cleveland is counted twice according to this site

Jimmy Carter, George W. Bush, Bill Clinton, George W. Bush Jr., Barack Obama, and Donald Trump are all alive.

So adjusting for 45 presidents for -1 (Grover was double counted) and -6 (presidents still alive), we now have 38 dead US presidents. The probability that at least 2 passed away on the same date (assuming a 365-day calendar) is 86.4%

bday <- function(n){
        numerator = 1
        for (i in 1:n-1){
                m = 365-i
                numerator = numerator * m  
        }

        return(1-(numerator/(365**n)))
}

bday(38)*100
## [1] 86.40678