From the first 1000 primes: The ordinality of the prime is followed by the prime itself:
24 89
87 449
95 499
628 4649
654 4889
665 4969
669 4999
837 6449
839 6469
862 6689
884 6869
887 6899
892 6949
from
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
For n = 2 To 1000
s = LTrim(Str(prm(n)))
good = 1
For i = 1 To Len(s)
If InStr("4689", Mid(s, i, 1)) = 0 Then good = 0
Next
If good Then Text1.Text = Text1.Text & n & Str(prm(n)) & crlf
Next
Text1.Text = Text1.Text & crlf & crlf & ct
End Sub
Function prm(i)
Dim p As Long
Open "17-bit primes.bin" For Random As #111 Len = 4
Get #111, i, p
prm = p
Close 111
End Function
|
Posted by Charlie
on 2015-02-24 11:11:57 |