Final answer:
The probability of winning if rolling first is 1/n + [(n-1)/n * 1/n] + [(n-1)/n * (n-1)/n * 1/n] + ...
Step-by-step explanation:
In this scenario, you are rolling a die with n sides, and the first to roll a 1 wins. Let's calculate the probability of winning if you roll first.
The probability of rolling a 1 on the first roll is 1/n. The probability of not rolling a 1 on the first roll is (n-1)/n.
If you don't roll a 1 on the first roll, the game continues with your friend rolling the die. The probability of your friend rolling a 1 on their first roll is 1/n, and the probability of them not rolling a 1 is (n-1)/n.
This pattern continues until one of you rolls a 1. So, the probability of you winning the game is: (1/n) + [(n-1)/n * (1/n)] + [(n-1)/n * (n-1)/n * (1/n)] + ...
Adding up this infinite geometric series, the probability of you winning if you roll first is:
P(win) = 1/n + [(n-1)/n * 1/n] + [(n-1)/n * (n-1)/n * 1/n] + ...)