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

Advancing to step 1:
6 divided by 31 is 0 with a remainder of 6.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 6 and we're left with 6.
Fetch the next digit (6) from the dividend, attach it to 6 and continue: 66 / 31

Moving on to step 2:
The number 31 fits into 66 2 times, leaving a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Deduct 62 from 66 and we're left with 4.
Grab the next digit (5) from the dividend, add it to 4, then carry on: 45 / 31

Step 3:
31 can be fit into 45 1 times, resulting in a remainder of 14.
Put 1 as the next digit of the answer. 
Result so far: 21.0
Deduct 31 from 45 and we're left with 14.
Grab the next digit (8) from the dividend, add it to 14, then carry on: 148 / 31

On to step 4:
148 divided by 31 is 4 with a remainder of 24.
The number 4 becomes the next digit in our result. 
Result so far: 214.0
If we subtract 124 from 148, we get 24.
Append the next digit (2) from the dividend to 24 and continue with: 242 / 31

Going ahead to step 5:
The number 31 fits into 242 7 times, leaving a remainder of 25.
Write down 7 as next digit of the result. 
Result so far: 2147.0
The remainder is 25 after subtracting 217 from 242.
Bring next digit (9) of the dividend behind the 25 and repeat the process: 259 / 31

Going ahead to step 6:
31 goes into 259 8 times with a remainder of 11.
Write down 8 as next digit of the result. 
Result so far: 21478.0
Deduct 248 from 259 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 7:
31 goes into 110 3 times with a remainder of 17.
The next digit of our result is 3. 
Result so far: 21478.3
If we take 93 away from 110, we end up with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Advancing to step 8:
When dividing 170 by 31, we get 5 with a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 21478.35
Subtract 155 from 170 to get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 9:
The number 31 fits into 150 4 times, leaving a remainder of 26.
Record the quotient 4 as the next digit in the result. 
Result so far: 21478.354
If we subtract 124 from 150, we get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Moving on to step 10:
The number 31 fits into 260 8 times, leaving a remainder of 12.
Write down 8 as next digit of the result. 
Result so far: 21478.3548
Deduct 248 from 260 and we're left with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 11:
If we divide 120 by 31, we get 3 and a remainder of 27.
Put 3 as the next digit of the answer. 
Result so far: 21478.35483
The remainder is 27 after subtracting 93 from 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Advancing to step 12:
If we divide 270 by 31, we get 8 and a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 21478.354838
If we take 248 away from 270, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

On to step 13:
220 divided by 31 is 7 with a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 21478.3548387
The remainder is 3 after subtracting 217 from 220.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

On to step 14:
The number 31 fits into 30 0 times, leaving a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 21478.3548387
Subtract 0 from 30 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

The final result is 21478.3548387 with a remainder of 3e-08.