Determine the quotient and the remainder when a positive integer N constituted entirely by 10001 sevens is divided by 10001.
Below is a listing of the quotient and remainder for the first several values for N where N is a series of 7s.
If k is the number of 7s, the remainder is 0 when k is 0 mod 8 and 7 when k is 1 mod 8.
Since 100001 is 1 mod 8, the remainder is 7.
The quotient, starting with N=5, is N-4 digits long with a repeating pattern of 4 7s followed by 4 0s, so a cycle of 8. We already know 10001 is 1 mod 8, so 10001-4 is 5 mod 8
The quotient is [77770000] repeated 1249 times followed by [77770]
777700007777000077770000 ... repeated 1249 times in total ... 7777000077770
1 [0, 7]
2 [0, 77]
3 [0, 777]
4 [0, 7777]
5 [7, 7770]
6 [77, 7700]
7 [777, 7000]
8 [7777, 0]
9 [77770, 7]
10 [777700, 77]
11 [7777000, 777]
12 [77770000, 7777]
13 [777700007, 7770]
14 [7777000077, 7700]
15 [77770000777, 7000]
16 [777700007777, 0]
17 [7777000077770, 7]
18 [77770000777700, 77]
19 [777700007777000, 777]
20 [7777000077770000, 7777]
21 [77770000777700007, 7770]
22 [777700007777000077, 7700]
23 [7777000077770000777, 7000]
24 [77770000777700007777, 0]
25 [777700007777000077770, 7]
26 [7777000077770000777700, 77]
27 [77770000777700007777000, 777]
28 [777700007777000077770000, 7777]
29 [7777000077770000777700007, 7770]
|
Posted by Larry
on 2023-11-16 11:36:24 |