We can solve this by writing down all the prime number from 2 to 83 and then finding the differences between them and add them all. This is a tedious task.
Let me introduce you with a shortcut way:
If n was 1.
The series would have been just dp1, which is the difference between the second and the first prime numbers, 3 and 2.
So, dp1 = 3 - 2 = 1
If n was 2.
The series would have been just dp1 + dp2
dp2 = difference between 3rd and 2nd odd numbers, 5 and 3 = 5 - 3 = 2
So sum of the series when n is 2 = dp1 + dp2 = 1 + 2 = 3
If n was 3.
The The series would have been just dp1 + dp2 + dp3
dp3 = difference between 4th and 3rd odd numbers, 7 and 5 = 7 - 5 = 2
So sum of the series when n is 3 = dp1 + dp2 + dp3= 1 + 2 + 2= 5
Did you notice something ??
S1 = 1 when last prime number is 3
S2 = 3 when last prime number is 5
S3 = 5 when last prime number is 7 and so on.
So the sum of the series is 2 less than the last prime number.
So S23 = 83 - 2 = 81