Skip to content

Commit aaa8e59

Browse files
committed
modified: Math/congruence_of_powers_factorization_method.sf -- minor improvement
1 parent 9483c88 commit aaa8e59

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Math/congruence_of_powers_factorization_method.sf

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func cgpow_factor (n) {
2222
var range = (2 .. min(n.ilog2, 15) -> flip)
2323

2424
func process_congruence(root, e) {
25-
for j in (1, 0) {
25+
for j in (-1, 0, 1) {
2626

2727
var k = (root + j)
2828
var u = powmod(k, e, n)
@@ -110,18 +110,19 @@ say cgpow_factor((2**128 - 1) * (3**128 - 1))
110110
say cgpow_factor((5**48 + 1) * (3**120 + 1))
111111
say cgpow_factor((5**48 + 1) * (3**120 - 1))
112112
say cgpow_factor((5**48 - 1) * (3**120 + 1))
113+
say cgpow_factor((45**120 + 35**420))
113114

114115
__END__
115116
[4294967295, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457]
116117
[100000001, 9999999900000001, 99999999000000009999999900000001, 10000000099999999999999989999999899999999000000000000000100000001]
117118
[1000001, 1202981, 1587789, 2906161, 99009901, 1000000000001, 10989010989011, 165573604901641, 9999000099990001, 100009999999899989999000000010001]
118119
[999999999999999999999999999999999999999999999999999999999995, 1000000000000000000000000000000000000000000000000000000000005]
119120
[1111111, 8392599, 119152601, 900900990991, 900009090090909909099991, 1109988789001111109989898989900111110998878900111]
120-
[1478477, 4734601891, 142714428428714143, 1099988890111109888900011, 910009191000909089989898989899909091000919100091]
121+
[1478477, 4734601891, 156985855573, 999990000099999000009999900001, 910009191000909089989898989899909091000919100091]
121122
[999999999999999999999999999999999999999999999999999999997866, 1000000000000000000000000000000000000000000000000000000002134]
122123
[4294836225, 4294967297, 4294967297, 4295098369, 18446744073709551617, 18446744073709551617, 340282366920938463463374607431768211457]
123124
[340282366920938463463374607431768211454, 115792089237316195423570985008687907852929702298719625575994209400481361428481]
124-
[3281, 1574400, 21523361, 286331153, 4294967297, 926510094425921, 18446744073709551617, 1716841910146256242328924544641]
125-
[1273028, 58670043945697, 85478404059502757678522722227078693011581120196844309212043610634613697]
126-
[1013824, 1519505, 9123144811, 76293945313, 282042646705, 240031591394168814433, 87948461151900837166585961]
127-
[1695421, 1893137, 1899648, 2765367833, 378638814119644490036480543351357341599724493419037625202060561]
125+
[41, 1048560, 1979408, 5570645, 6700417, 43046722, 926510094425921, 18446744073709551617, 1716841910146256242328924544641]
126+
[1273028, 43040161, 76293945313, 1852737802355521, 240031591394168814433, 3434207167913380326433387290241]
127+
[1013824, 1801025, 2828617, 16068403, 47763361, 1743392201, 76293945313, 50446744628921761, 240031591394168814433]
128+
[1889856, 3390842, 43040161, 61132969, 1852737802355521, 59509277587890001, 3434207167913380326433387290241]

0 commit comments

Comments
 (0)