We look at the division of 51579856 by 31 
The aim is to understand the frequency of 31 in 51579856.

Advancing to step 1:
5 divided by 31 is 0 with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Fetch the next digit (1) from the dividend, attach it to 5 and continue: 51 / 31

Going ahead to step 2:
51 divided by 31 is 1 with a remainder of 20.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 31 from 51 to get 20.
Fetch the next digit (5) from the dividend, attach it to 20 and continue: 205 / 31

Moving on to step 3:
205 divided by 31 is 6 with a remainder of 19.
Put 6 as the next digit of the answer. 
Result so far: 16.0
The remainder is 19 after subtracting 186 from 205.
Append the next digit (7) from the dividend to 19 and continue with: 197 / 31

Going ahead to step 4:
31 can be fit into 197 6 times, resulting in a remainder of 11.
Put 6 as the next digit of the answer. 
Result so far: 166.0
Subtract 186 from 197 to get 11.
Fetch the next digit (9) from the dividend, attach it to 11 and continue: 119 / 31

Step 5:
When dividing 119 by 31, we get 3 with a remainder of 26.
Use 3 as the next digit of our solution. 
Result so far: 1663.0
If we take 93 away from 119, we end up with 26.
Bring next digit (8) of the dividend behind the 26 and repeat the process: 268 / 31

Advancing to step 6:
268 divided by 31 is 8 with a remainder of 20.
Write down 8 as next digit of the result. 
Result so far: 16638.0
Deduct 248 from 268 and we're left with 20.
Grab the next digit (5) from the dividend, add it to 20, then carry on: 205 / 31

Moving on to step 7:
31 can be fit into 205 6 times, resulting in a remainder of 19.
Use 6 as the next digit of our solution. 
Result so far: 166386.0
The remainder is 19 after subtracting 186 from 205.
Include the next digit (6) from the dividend after 19, then repeat: 196 / 31

Step 8:
If we divide 196 by 31, we get 6 and a remainder of 10.
Record the quotient 6 as the next digit in the result. 
Result so far: 1663866.0
The remainder is 10 after subtracting 186 from 196.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 9:
100 divided by 31 is 3 with a remainder of 7.
The next digit of our result is 3. 
Result so far: 1663866.3
The remainder is 7 after subtracting 93 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Going ahead to step 10:
If we divide 70 by 31, we get 2 and a remainder of 8.
The next digit of our result is 2. 
Result so far: 1663866.32
If we subtract 62 from 70, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 11:
The number 31 fits into 80 2 times, leaving a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 1663866.322
Subtract 62 from 80 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

After the division, we end up with 1663866.322 and a remainder of 0.0018.