Beispiel #1
0
func quantify(a, b int) int {
	for n := 0; ; n++ {
		if miller_rabin.Test(n*n + a*n + b) {
			continue
		} else {
			return n - 1
		}
	}
}
Beispiel #2
0
func main() {
	sum := 0
	for i := 0; i < limit; i++ {
		if m.Test(i) {
			sum += i
		}
	}
	println(sum)
}
Beispiel #3
0
func main() {
	primes_found, p := 1, 0
	for i := 1; primes_found < 10001; i += 2 {
		if miller_rabin.Test(i) {
			primes_found++
			p = i
		}
	}
	println(p)
}