Let a and b be positive integers such that
43/197 < a/b < 17/77.
Find the minimum possible value of b.
For a = 1 To 100
stb = -Int(-77 * a / 17)
For b = stb To 197 * a / 43
If b > 197 Then Exit For
If a / b > 43 / 197 Then Text1.Text = Text1.Text & a & "/" & b & crlf
DoEvents
Next
DoEvents
Next
is the essential part of the code producing a list that starts at the lowest a and b, and continues higher:
7/32
9/41
11/50
13/59
14/64
15/68
16/73
17/77
18/82
19/87
20/91
21/96
22/100
23/105
24/109
25/114
26/118
26/119
27/123
28/127
28/128
29/132
30/136
30/137
31/141
31/142
32/145
32/146
33/150
33/151
34/154
34/155
35/159
35/160
36/164
37/168
37/169
38/173
38/174
39/177
39/178
40/182
40/183
41/186
41/187
42/191
42/192
43/195
43/196
|
Posted by Charlie
on 2019-03-08 16:19:45 |