Let a be the smallest prime greater than 1000.
Let b=sqrt((2a+1)^2+4)+2a+1
Divide b by 2, and express the result as a continued fraction.
Happy New Year.
5 point 230
6 open "ring-new.txt" for output as #2
10 A=nxtprm(1000):print #2,A
20 B=sqrt((2*A+1)^2+4)+2*A+1
30 V=B/2
40 print V:print #2,B:print #2,V
50 for I=1 to 200
60 V=V-int(V)
70 V=1/V:print I,int(V):print #2,I,int(V)
75 if int(V)<>2019 cancel for:goto 90
80 next
90 close #2
finds the next prime after 1000 is 1009.
The program finds b to more than 1100 places, and it starts
4038.000990589157685270103117157751894043190769981733051620758379808583...
Divided by two it starts
2019.000495294578842635051558578875947021595384990866525810379189904291...
Repeatedly printing the integer part and replacing the value by the reciprocal of the previous value minus its integral part, gives:
1 2019
2 2019
3 2019
4 2019
5 2019
6 2019
7 2019
8 2019
9 2019
10 2019
11 2019
12 2019
13 2019
14 2019
15 2019
16 2019
17 2019
18 2019
19 2019
20 2019
21 2019
22 2019
23 2019
24 2019
25 2019
26 2019
27 2019
28 2019
29 2019
30 2019
31 2019
32 2019
33 2019
34 2019
35 2019
36 2019
37 2019
38 2019
39 2019
40 2019
41 2019
42 2019
43 2019
44 2019
45 2019
46 2019
47 2019
48 2019
49 2019
50 2019
51 2019
52 2019
53 2019
54 2019
55 2019
56 2019
57 2019
58 2019
59 2019
60 2019
61 2019
62 2019
63 2019
64 2019
65 2019
66 2019
67 2019
68 2019
69 2019
70 2019
71 2019
72 2019
73 2019
74 2019
75 2019
76 2019
77 2019
78 2019
79 2019
80 2019
81 2019
82 2019
83 2019
84 2019
85 2019
86 2019
87 2019
88 2019
89 2019
90 2019
91 2019
92 2019
93 2019
94 2019
95 2019
96 2019
97 2019
98 2019
99 2019
100 2019
101 2019
102 2019
103 2019
104 2019
105 2019
106 2019
107 2019
108 2019
109 2019
110 2019
111 2019
112 2019
113 2019
114 2019
115 2019
116 2019
117 2019
118 2019
119 2019
120 2019
121 2019
122 2019
123 2019
124 2019
125 2019
126 2019
127 2019
128 2019
129 2019
130 2019
131 2019
132 2019
133 2019
134 2019
135 2019
136 2019
137 2019
138 2019
139 2019
140 2019
141 2019
142 2019
143 2019
144 2019
145 2019
146 2019
147 2019
148 2019
149 2019
150 2019
151 2019
152 2019
153 2019
154 2019
155 2019
156 2019
157 2019
158 2019
159 2019
160 2019
161 2019
162 2019
163 2019
164 2019
165 2019
166 2019
167 2019
168 1645
where on the 168th iteration, presumably because of the finite precision, 2019s cease (maximum precision available in UBASIC leads to at least 190 of the 2019s).
|
Posted by Charlie
on 2019-01-01 14:53:34 |