Skip to content

Commit

Permalink
add millenium package
Browse files Browse the repository at this point in the history
  • Loading branch information
attilaolah committed Apr 17, 2014
1 parent e2ebe78 commit 6f1e330
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions millenium/millenium.go
@@ -0,0 +1,29 @@
package main

import (
"fmt"

"github.com/attilaolah/prcert/sieve"
)

const k = 99999999

func main() {
fmt.Println(1, 2, 0)
fmt.Println(2, 3, 2)
fmt.Println(3, 5, 0)

j := 4
var m, p, i uint64
for p = range sieve.Sieve7() {
m, i = 10, 1
for ; m != 1; i++ {
m = (10 * m) % p
}
for i = k % i; i != 0; i-- {
m = (10 * m) % p
}
fmt.Println(j, p, p-m)
j++
}
}

0 comments on commit 6f1e330

Please sign in to comment.