We're dividing 9787138 by 391 
The aim is to understand the frequency of 391 in 9787138.

Going ahead to step 1:
When dividing 9 by 391, we get 0 with a remainder of 9.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 9 leaves us with 9.
Take the next digit (7) from the dividend and append it to 9, then repeat: 97 / 391

Advancing to step 2:
The number 391 fits into 97 0 times, leaving a remainder of 97.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 97 to get 97.
Fetch the next digit (8) from the dividend, attach it to 97 and continue: 978 / 391

Advancing to step 3:
391 goes into 978 2 times with a remainder of 196.
Put 2 as the next digit of the answer. 
Result so far: 2.0
If we take 782 away from 978, we end up with 196.
Append the next digit (7) from the dividend to 196 and continue with: 1967 / 391

On to step 4:
1967 divided by 391 is 5 with a remainder of 12.
The next digit of our result is 5. 
Result so far: 25.0
Subtract 1955 from 1967 to get 12.
Bring next digit (1) of the dividend behind the 12 and repeat the process: 121 / 391

Going ahead to step 5:
The number 391 fits into 121 0 times, leaving a remainder of 121.
Put 0 as the next digit of the answer. 
Result so far: 250.0
If we take 0 away from 121, we end up with 121.
Take the next digit (3) from the dividend and append it to 121, then repeat: 1213 / 391

Let's proceed to step 6:
When dividing 1213 by 391, we get 3 with a remainder of 40.
Use 3 as the next digit of our solution. 
Result so far: 2503.0
Subtracting 1173 from 1213 leaves us with 40.
Grab the next digit (8) from the dividend, add it to 40, then carry on: 408 / 391

Advancing to step 7:
When dividing 408 by 391, we get 1 with a remainder of 17.
Put 1 as the next digit of the answer. 
Result so far: 25031.0
Subtract 391 from 408 to get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

On to step 8:
When dividing 170 by 391, we get 0 with a remainder of 170.
The number 0 becomes the next digit in our result. 
Result so far: 25031.0
Deduct 0 from 170 and we're left with 170.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1700, and continue the process.

Going ahead to step 9:
1700 divided by 391 is 4 with a remainder of 136.
Record the quotient 4 as the next digit in the result. 
Result so far: 25031.04
If we subtract 1564 from 1700, we get 136.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1360, and continue the process.

On to step 10:
If we divide 1360 by 391, we get 3 and a remainder of 187.
The next digit of our result is 3. 
Result so far: 25031.043
The remainder is 187 after subtracting 1173 from 1360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1870, and continue the process.

Advancing to step 11:
When dividing 1870 by 391, we get 4 with a remainder of 306.
Write down 4 as next digit of the result. 
Result so far: 25031.0434
Deduct 1564 from 1870 and we're left with 306.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3060, and continue the process.

Moving on to step 12:
If we divide 3060 by 391, we get 7 and a remainder of 323.
The number 7 becomes the next digit in our result. 
Result so far: 25031.04347
Subtract 2737 from 3060 to get 323.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3230, and continue the process.

On to step 13:
3230 divided by 391 is 8 with a remainder of 102.
The number 8 becomes the next digit in our result. 
Result so far: 25031.043478
Subtracting 3128 from 3230 leaves us with 102.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1020, and continue the process.

Advancing to step 14:
The number 391 fits into 1020 2 times, leaving a remainder of 238.
Write down 2 as next digit of the result. 
Result so far: 25031.0434782
Deduct 782 from 1020 and we're left with 238.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2380, and continue the process.

On to step 15:
391 can be fit into 2380 6 times, resulting in a remainder of 34.
Record the quotient 6 as the next digit in the result. 
Result so far: 25031.04347826
Deduct 2346 from 2380 and we're left with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

Our division results in 25031.04347826 with a remaining 3.4e-08.