Example #1
0
func main() {
	for i := uint64(724709891); i < 729927007; i += 100000 {
		if mathutil.IsPrimeUint64(i) && IsPrimitive(10, i) {
			fmt.Println((i - 1) * 9 / 2)
		}
	}
}
Example #2
0
func main() {
	ary := Uint64s{7, 6, 5, 4, 3, 2, 1}
	var num uint64
	for mathutil.PermutationNext(ary) {
		num = 0
		for _, v := range ary {
			num = 10*num + v
		}
		if mathutil.IsPrimeUint64(num) {
			fmt.Println(num)
			break
		}
	}
}