The odds of two students getting the same number, regardless of which number the first student gets, is 1:25. The odds of them getting the same number--such as both of them getting 13--would be 25*25=1:625. These are the same odds of three students getting the same numbers in a row without considering which number they get in a row. Then, if you add another student, just multiply the previous answer by 25.