DefDbl A-Z
Dim crlf$
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
Private Sub Form_Load()
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
s = 2016
For n = 1 To 6000
a1 = (s - n * n + n) / n
If a1 = Int(a1) Then
Text1.Text = Text1.Text & mform(n, "####0") & " " & mform(a1, "####0") & " " & mform(a1 + 2 * n - 2, "####0") & crlf
DoEvents
End If
Next
Text1.Text = Text1.Text & " done"
End Sub
finds
# of 1st last
members member member
1 2016 2016
2 1007 1009
3 670 674
4 501 507
6 331 341
7 282 294
8 245 259
9 216 232
12 157 179
14 131 157
16 111 141
18 95 129
21 76 116
24 61 107
28 45 99
32 32 94
36 21 91
42 7 89
48 -5 89
56 -19 91
63 -30 94
72 -43 99
84 -59 107
96 -74 116
112 -93 129
126 -109 141
144 -129 157
168 -155 179
224 -214 232
252 -243 259
288 -280 294
336 -329 341
504 -499 507
672 -668 674
1008 -1005 1009
2016 -2014 2016
|
Posted by Charlie
on 2015-01-23 15:20:44 |