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

 Composite prime (Posted on 2015-02-24)
What is the smallest prime number such that all of its digits are composite?

 See The Solution Submitted by Math Man Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 smallest and beyond--computer exploration (spoiler) Comment 2 of 2 |
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\$

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

 Search: Search body:
Forums (4)