Let's divide 39640754 by 31
The aim is to understand the frequency of 31 in 39640754.

On to step 1:
31 can be fit into 3 0 times, resulting in a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Append the next digit (9) from the dividend to 3 and continue with: 39 / 31

Moving on to step 2:
When dividing 39 by 31, we get 1 with a remainder of 8.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 31 away from 39, we end up with 8.
Include the next digit (6) from the dividend after 8, then repeat: 86 / 31

Advancing to step 3:
86 divided by 31 is 2 with a remainder of 24.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 62 from 86, we get 24.
Append the next digit (4) from the dividend to 24 and continue with: 244 / 31

Moving on to step 4:
31 can be fit into 244 7 times, resulting in a remainder of 27.
Record the quotient 7 as the next digit in the result. 
Result so far: 127.0
Deduct 217 from 244 and we're left with 27.
Grab the next digit (0) from the dividend, add it to 27, then carry on: 270 / 31

Going ahead to step 5:
If we divide 270 by 31, we get 8 and a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 1278.0
Subtract 248 from 270 to get 22.
Bring next digit (7) of the dividend behind the 22 and repeat the process: 227 / 31

On to step 6:
When dividing 227 by 31, we get 7 with a remainder of 10.
The number 7 becomes the next digit in our result. 
Result so far: 12787.0
If we take 217 away from 227, we end up with 10.
Fetch the next digit (5) from the dividend, attach it to 10 and continue: 105 / 31

Going ahead to step 7:
31 can be fit into 105 3 times, resulting in a remainder of 12.
The number 3 becomes the next digit in our result. 
Result so far: 127873.0
Subtract 93 from 105 to get 12.
Grab the next digit (4) from the dividend, add it to 12, then carry on: 124 / 31

Advancing to step 8:
When dividing 124 by 31, we get 4 with a remainder of 0.
Write down 4 as next digit of the result. 
Result so far: 1278734.0
Subtract 124 from 124 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 9:
31 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1278734.0
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 10:
When dividing 0 by 31, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 1278734.0
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The quotient of the division is 1278734.0, and the remainder is 0.0.