Did you not see my response?
The chance of Days 1 and 2 being the same are 1 out of 40 (same set repeated).
The chance of having at least one repeat in Days 1-3 would be that 1/40 plus 2/40 times the complement of 1/40, or 39/40, or (1/40) + (2/40)(39/40), and so forth, which would eventually result in 1- (40)(39)(38)(37)(36)/40^5.
I'm sorry, but I can only give you partial credit. But you should be able to make it up on the final
exam.
Your expression would not reduce to mine. You were on the right track when you mentioned
extra terms were needed. The probability is an additional fortieth for each additional day, but
only for the percentage of the time when the existing days didn't already have a repeat. In
other words, the sum of:
Day1 = 0
Day2 = 1/40 * (1 - Day1) = 1/40 * (1 - 0) = 1/40
Day3 = 2/40 * (1 - Day2) = 2/40 * (1 - 1/40) = 2/40 * 39/40 = 78/1600
Day4 = 3/40 * (1 - Day3) = 3/40 * (1 - 78/1600) = 3/40 * 1522/1600 = 4566/64000
Day5 = 4/40 * (1 - Day4) = 4/40 * (1 - 4566/64000) = 4/40 * 59434/64000 = 237736/2560000
Unfortunately, this sums to 0.2379..., which doesn't agree with my result. Either I've made a
mistake in my calculations, or else summing the probabilities of successive days is not equivalent
to counting all the five-day combinations with repeated years. I will have to ponder this further.