Explanation 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 dp_{1}, which is the difference between the second and the first prime numbers, 3 and 2.
So, dp_{1} = 3 - 2 = 1
If n was 2.
The series would have been just dp_{1 }+ dp_{2}
dp_{2} = difference between 3rd and 2nd odd numbers, 5 and 3 = 5 - 3 = 2
So sum of the series when n is 2 = dp_{1 }+ dp_{2} = 1 + 2 = 3
If n was 3.
The The series would have been just dp_{1 }+ dp_{2} + dp_{3}
dp_{3} = difference between 4th and 3rd odd numbers, 7 and 5 = 7 - 5 = 2
So sum of the series when n is 3 = dp_{1 }+ dp_{2} + dp_{3}= 1 + 2 + 2= 5
Did you notice something ??
S_{1} = 1 when last prime number is 3
S_{2} = 3 when last prime number is 5
S_{3} = 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 S_{23} = 83 - 2 = 81