We divide 517797 by 31
We want to figure out the number of times 517797 can be divided by 31.

Going ahead to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Bring next digit (1) of the dividend behind the 5 and repeat the process: 51 / 31

Advancing to step 2:
If we divide 51 by 31, we get 1 and a remainder of 20.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we take 31 away from 51, we end up with 20.
Append the next digit (7) from the dividend to 20 and continue with: 207 / 31

Advancing to step 3:
207 divided by 31 is 6 with a remainder of 21.
The next digit of our result is 6. 
Result so far: 16.0
Subtract 186 from 207 to get 21.
Take the next digit (7) from the dividend and append it to 21, then repeat: 217 / 31

Moving on to step 4:
31 goes into 217 7 times with a remainder of 0.
Put 7 as the next digit of the answer. 
Result so far: 167.0
Subtract 217 from 217 to get 0.
Include the next digit (9) from the dividend after 0, then repeat: 9 / 31

Let's proceed to step 5:
When dividing 9 by 31, we get 0 with a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 1670.0
Subtracting 0 from 9 leaves us with 9.
Bring next digit (7) of the dividend behind the 9 and repeat the process: 97 / 31

Step 6:
The number 31 fits into 97 3 times, leaving a remainder of 4.
Record the quotient 3 as the next digit in the result. 
Result so far: 16703.0
Deduct 93 from 97 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Advancing to step 7:
The number 31 fits into 40 1 times, leaving a remainder of 9.
The number 1 becomes the next digit in our result. 
Result so far: 16703.1
If we subtract 31 from 40, we get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Step 8:
31 can be fit into 90 2 times, resulting in a remainder of 28.
Write down 2 as next digit of the result. 
Result so far: 16703.12
The remainder is 28 after subtracting 62 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Step 9:
31 can be fit into 280 9 times, resulting in a remainder of 1.
Write down 9 as next digit of the result. 
Result so far: 16703.129
Subtract 279 from 280 to get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 10:
If we divide 10 by 31, we get 0 and a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 16703.129
If we subtract 0 from 10, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 11:
When dividing 100 by 31, we get 3 with a remainder of 7.
Write down 3 as next digit of the result. 
Result so far: 16703.12903
If we subtract 93 from 100, we get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

On to step 12:
31 can be fit into 70 2 times, resulting in a remainder of 8.
The next digit of our result is 2. 
Result so far: 16703.129032
Subtracting 62 from 70 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 13:
If we divide 80 by 31, we get 2 and a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 16703.1290322
If we subtract 62 from 80, we 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.

In conclusion, the division gives 16703.1290322 with a balance of 1.8e-07.