bn
作者:互联网
p(t) = 36t 4 + 36t 3 + 24t 2 + 6t + 1,
r(t) = 36t 4 + 36t 3 + 18t 2 + 6t + 1,
tr(t) = 6t 2 + 1,
func main() {
p := 6 * 66410 + 1
r := 6 * 66310 + 1
d := 1
for i := 1; i < 0xfffffffff; i++{
d *= p
d = d % r
//fmt.Println(d)
if d == 1 {
fmt.Println(i)
return
}
}
}
func zmain() {
//u, _ := new(big.Int).SetString("6518589491078791937", 10)
for j := 1; j < 0xfffffff; j++{
u := big.NewInt(int64(j))
u2 := new(big.Int).Mul(u, u)
u3 := new(big.Int).Mul(u2, u)
u4 := new(big.Int).Mul(u3, u)
p := new(big.Int).Mul(u4, big.NewInt(36))
p.Add(p, new(big.Int).Mul(u3, big.NewInt(36)))
p.Add(p, new(big.Int).Mul(u, big.NewInt(6)))
p.Add(p, big.NewInt(1))
r := new(big.Int).Set(p)
p.Add(p, new(big.Int).Mul(u2, big.NewInt(24)))
r.Add(r, new(big.Int).Mul(u2, big.NewInt(18)))
//fmt.Println(p)
//fmt.Println(r)
for i := 1; i < 0xfffffffff; i++{
d := new(big.Int).Exp(p, new(big.Int).SetUint64(uint64(i)), r)
if d.Cmp(new(big.Int).SetUint64(1)) == 0 {
if i == 12 {
break
}
fmt.Println(j)
fmt.Println(i)
}
}
}
}
标签:NewInt,Int,big,bn,new,Mul,fmt 来源: https://www.cnblogs.com/Janly/p/15185044.html