-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added the Number
cyclotomic_factor(n, bases...)
method.
Factorization method, based on cyclotomic polynomials, trying to find algebraic factors of `n`. say cyclotomic_factor(2**120 + 1) say cyclotomic_factor((10**258 - 1)/9 - 10**(258/2) - 1, 10) Output: [257, 65281, 4278255361, 18518800563924107521] [10, 11, 11, 91, 101, 10001, 100000001, 10000000000000001, 100000000000000000000000000000001, 909090909090909090909090909090909090909091, 10000000000000000000000000000000000000000000000000000000000000001, 1098901098901098901098901098901098901098900989010989010989010989010989010989010989011] An optional list of bases can be given to restrict the search only to the given bases.
- Loading branch information
Showing
3 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters