Smarandache-Wellin primes: Difference between revisions
→{{header|Go}}: Corrected ordinal number display.
(→{{header|C}}: Changed in line with Wren solution of which it is a translation.) |
(→{{header|Go}}: Corrected ordinal number display.) |
||
Line 178:
"strings"
)
func ord(count int) string {
if count == 1 {
return "st"
}
if count == 2 {
return "nd"
}
if count == 3 {
return "rd"
}
return "th"
}
func main() {
Line 196 ⟶ 209:
sws = sws[0:20] + "..." + sws[le-20:le]
}
fmt.Printf("%
}
i++
Line 219 ⟶ 232:
if n.ProbablyPrime(15) {
count++
fmt.Printf("%
}
i++
Line 228 ⟶ 241:
<pre>
The known Smarandache-Wellin primes are:
4th: index 128 digits 355 last prime 719 -> 23571113171923293137...73677683691701709719
5th: index 174 digits 499 last prime 1033 -> 23571113171923293137...10131019102110311033
Line 238 ⟶ 251:
The first 20 Derived Smarandache-Wellin primes are:
4th: index 134 prime 13672766322929571043
5th: index 225 prime 3916856106393739943689
|