All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
2018 to 2019 (Posted on 2019-03-01) Difficulty: 3 of 5
Is there a number in the form 201820182018...2018 with 2018 repeating n times that is a multiple of 2019?

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 3
Yes, there is:

2019 = 3 * 673
2018 = 2 * 1009
10000=  1924 mod 2019


201820182018...2018

is 2018 times a number of the form 100010001...0001.  We want to find a number such that this is congruent to 0 mod 2019, so we can use modular arithmetic when building the number.

Each repetition multiplies the (modular) value of the 100010001...0001 number by a factor of 10000 and then adds 1 to it. The number whose value mod 2019 we seek to make zero it this result times 2018 and whose value is of course taken mod 2019.

The program

 b = 1: p = 1
 Do
    b = (b * 10000 + 1) Mod 2019
    p = p + 1
    n = (b * 2018) Mod 2019
    Text1.Text = Text1.Text & p & Str(n) & crlf
    If n = 0 Then Exit Do
    DoEvents
 Loop Until b = 1

performs this until a repeated value is found or the remainder becomes zero.

You can verify the first few, that:

20182018 mod 2019 = 94
201820182018 mod 2019 = 1164, etc.

With 168 repetitions the remainder does become zero.

The number n is 168.

2 94
3 1164
4 464
5 337
6 288
7 905
8 841
9 864
10 698
11 316
12 264
13 1166
14 274
15 216
16 1688
17 1159
18 939
19 1649
20 826
21 270
22 596
23 1930
24 378
25 431
26 1453
27 1275
28 14
29 688
30 1266
31 869
32 223
33 1023
34 1745
35 1801
36 519
37 1169
38 2008
39 1044
40 1769
41 1540
42 1086
43 1817
44 1018
45 201
46 1094
47 1057
48 534
49 1763
50 91
51 1449
52 1655
53 256
54 1926
55 758
56 673
57 672
58 767
59 1837
60 1137
61 1010
62 961
63 1578
64 1514
65 1537
66 1371
67 989
68 937
69 1839
70 947
71 889
72 342
73 1832
74 1612
75 303
76 1499
77 943
78 1269
79 584
80 1051
81 1104
82 107
83 1948
84 687
85 1361
86 1939
87 1542
88 896
89 1696
90 399
91 455
92 1192
93 1842
94 662
95 1717
96 423
97 194
98 1759
99 471
100 1691
101 874
102 1767
103 1730
104 1207
105 417
106 764
107 103
108 309
109 929
110 580
111 1431
112 1346
113 1345
114 1440
115 491
116 1810
117 1683
118 1634
119 232
120 168
121 191
122 25
123 1662
124 1610
125 493
126 1620
127 1562
128 1015
129 486
130 266
131 976
132 153
133 1616
134 1942
135 1257
136 1724
137 1777
138 780
139 602
140 1360
141 15
142 593
143 196
144 1569
145 350
146 1072
147 1128
148 1865
149 496
150 1335
151 371
152 1096
153 867
154 413
155 1144
156 345
157 1547
158 421
159 384
160 1880
161 1090
162 1437
163 776
164 982
165 1602
166 1253
167 85
168 0

Edited on March 1, 2019, 2:32 pm
  Posted by Charlie on 2019-03-01 13:33:13

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2021 by Animus Pactum Consulting. All rights reserved. Privacy Information