We look at the division of 976707 by 51 
The aim is to understand the frequency of 51 in 976707.

On to step 1:
51 can be fit into 9 0 times, resulting in a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 9, we end up with 9.
Append the next digit (7) from the dividend to 9 and continue with: 97 / 51

On to step 2:
If we divide 97 by 51, we get 1 and a remainder of 46.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
The remainder is 46 after subtracting 51 from 97.
Bring next digit (6) of the dividend behind the 46 and repeat the process: 466 / 51

Moving on to step 3:
If we divide 466 by 51, we get 9 and a remainder of 7.
Record the quotient 9 as the next digit in the result. 
Result so far: 19.0
The remainder is 7 after subtracting 459 from 466.
Take the next digit (7) from the dividend and append it to 7, then repeat: 77 / 51

Going ahead to step 4:
When dividing 77 by 51, we get 1 with a remainder of 26.
Put 1 as the next digit of the answer. 
Result so far: 191.0
If we take 51 away from 77, we end up with 26.
Append the next digit (0) from the dividend to 26 and continue with: 260 / 51

Step 5:
If we divide 260 by 51, we get 5 and a remainder of 5.
Record the quotient 5 as the next digit in the result. 
Result so far: 1915.0
If we subtract 255 from 260, we get 5.
Append the next digit (7) from the dividend to 5 and continue with: 57 / 51

Going ahead to step 6:
57 divided by 51 is 1 with a remainder of 6.
The next digit of our result is 1. 
Result so far: 19151.0
Subtract 51 from 57 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Moving on to step 7:
When dividing 60 by 51, we get 1 with a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 19151.1
Deduct 51 from 60 and we're left with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 8:
51 goes into 90 1 times with a remainder of 39.
Write down 1 as next digit of the result. 
Result so far: 19151.11
The remainder is 39 after subtracting 51 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 390, and continue the process.

After the division, we end up with 19151.11 and a remainder of 0.039.