We look at the division of 8038971 by 37 
The aim is to understand the frequency of 37 in 8038971.

On to step 1:
When dividing 8 by 37, we get 0 with a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Append the next digit (0) from the dividend to 8 and continue with: 80 / 37

On to step 2:
80 divided by 37 is 2 with a remainder of 6.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtract 74 from 80 to get 6.
Grab the next digit (3) from the dividend, add it to 6, then carry on: 63 / 37

Moving on to step 3:
63 divided by 37 is 1 with a remainder of 26.
The number 1 becomes the next digit in our result. 
Result so far: 21.0
If we subtract 37 from 63, we get 26.
Include the next digit (8) from the dividend after 26, then repeat: 268 / 37

Going ahead to step 4:
The number 37 fits into 268 7 times, leaving a remainder of 9.
The number 7 becomes the next digit in our result. 
Result so far: 217.0
Subtracting 259 from 268 leaves us with 9.
Take the next digit (9) from the dividend and append it to 9, then repeat: 99 / 37

Advancing to step 5:
When dividing 99 by 37, we get 2 with a remainder of 25.
Use 2 as the next digit of our solution. 
Result so far: 2172.0
Deduct 74 from 99 and we're left with 25.
Grab the next digit (7) from the dividend, add it to 25, then carry on: 257 / 37

On to step 6:
37 can be fit into 257 6 times, resulting in a remainder of 35.
The next digit of our result is 6. 
Result so far: 21726.0
If we take 222 away from 257, we end up with 35.
Fetch the next digit (1) from the dividend, attach it to 35 and continue: 351 / 37

Moving on to step 7:
351 divided by 37 is 9 with a remainder of 18.
Put 9 as the next digit of the answer. 
Result so far: 217269.0
Subtracting 333 from 351 leaves us with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Let's proceed to step 8:
When dividing 180 by 37, we get 4 with a remainder of 32.
The next digit of our result is 4. 
Result so far: 217269.4
If we take 148 away from 180, we end up with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Going ahead to step 9:
The number 37 fits into 320 8 times, leaving a remainder of 24.
Write down 8 as next digit of the result. 
Result so far: 217269.48
If we subtract 296 from 320, we get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Moving on to step 10:
37 can be fit into 240 6 times, resulting in a remainder of 18.
The number 6 becomes the next digit in our result. 
Result so far: 217269.486
Subtract 222 from 240 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.

Step 11:
If we divide 180 by 37, we get 4 and a remainder of 32.
Write down 4 as next digit of the result. 
Result so far: 217269.4864
Subtracting 148 from 180 leaves us with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Moving on to step 12:
The number 37 fits into 320 8 times, leaving a remainder of 24.
Record the quotient 8 as the next digit in the result. 
Result so far: 217269.48648
If we subtract 296 from 320, we get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Going ahead to step 13:
37 goes into 240 6 times with a remainder of 18.
Write down 6 as next digit of the result. 
Result so far: 217269.486486
Deduct 222 from 240 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Going ahead to step 14:
The number 37 fits into 180 4 times, leaving a remainder of 32.
Record the quotient 4 as the next digit in the result. 
Result so far: 217269.4864864
If we subtract 148 from 180, we get 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

On to step 15:
320 divided by 37 is 8 with a remainder of 24.
The next digit of our result is 8. 
Result so far: 217269.48648648
Subtract 296 from 320 to get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

After the division, we end up with 217269.48648648 and a remainder of 2.4e-08.