Let X_{i} denote the random variable for i^{th} selection being prime.
We require expected value of sum of all X_{i} to be 1. Linearity of expectation (refer link at bottom) says that expected value of sum of a random variable is equal to the sum of the individual expectations.
i.e., E(∑ X_{i}) = ∑ E(X_{i})
We have X_{i } = 1/2302 and that is the same for all i. (once we take a number that number can be repeated also and hence events are independent)
So, E(∑ X_{i}) = ∑ E(X_{i}) = 1
=> ∑ (1/2302) = 1
as summation is from 1 to n, we get
n/2302 = 1 => n = 2302
http://www.cse.iitd.ac.in/~mohanty/col106/Resources/linearity_expectation.pdf