LoginSignup
1
0

More than 1 year has passed since last update.

桁数の大きい数を素因数分解する

Posted at

msieveというソフトを使う

ぽんこつCPUでも81桁では1分38秒で計算が終わった

msieve153.exe -q -v -e 831416828080417866340504968188990032810316193533653516022175784399720141076262857

Msieve v. 1.53 (SVN 1005)
Wed Nov 02 00:14:20 2022
random seeds: 324f2e40 549d700a
factoring 831416828080417866340504968188990032810316193533653516022175784399720141076262857 (81 digits)
searching for 15-digit factors
searching for 20-digit factors
commencing quadratic sieve (81-digit input)
using multiplier of 2
using generic 32kb sieve core
sieve interval: 12 blocks of size 32768
processing polynomials in batches of 17
using a sieve bound of 1321063 (50882 primes)
using large prime bound of 126822048 (26 bits)
using trial factoring cutoff of 27 bits
polynomial 'A' values have 10 factors
restarting with 16677 full and 175600 partial relations

sieving in progress (press Ctrl-C to pause)
51053 relations (26181 full + 24872 combined from 275592 partial), need 50978
51053 relations (26181 full + 24872 combined from 275592 partial), need 50978
sieving complete, commencing postprocessing
begin with 301773 relations
reduce to 72814 relations in 2 passes
attempting to read 72814 relations
recovered 72814 relations
recovered 62636 polynomials
attempting to build 51053 cycles
found 51053 cycles in 1 passes
distribution of cycle lengths:
   length 1 : 26181
   length 2 : 24872
largest cycle: 2 relations
matrix is 50882 x 51053 (7.6 MB) with weight 1592469 (31.19/col)
sparse part has weight 1592469 (31.19/col)
filtering completed in 3 passes
matrix is 36283 x 36346 (6.0 MB) with weight 1270136 (34.95/col)
sparse part has weight 1270136 (34.95/col)
saving the first 48 matrix rows for later
matrix includes 64 packed rows
matrix is 36235 x 36346 (4.4 MB) with weight 979594 (26.95/col)
sparse part has weight 785627 (21.62/col)
using block size 8192 and superblock size 589824 for processor cache size 6144 kB
commencing Lanczos iteration
memory use: 2.5 MB
lanczos halted after 574 iterations (dim = 36222)
recovered 10 nontrivial dependencies
p40 factor: 1593021310640923782355996681284584012117
p42 factor: 521911930824021492581321351826927897005221
elapsed time 00:01:38

ちなみに312桁以上は計算できないそう。できたとしても死ぬほど時間がかかると思われる

msieve153.exe -q -v 1615765684321463054078226051959887884233678317734892901740763321135213636796075462401950274602405095138589898087428337758445013281488966866073355710771864671726991918706558071231266976427184673800225254531695928541272546385146495736420261815693810544589811104967829354461491178200126099661909654163542661541699404839644035177445092988952614918424317082380174383819025585076206641993479326576180793544321194357018916215113009742654408597083724508169216182008449693917227497813165444372201517541788989925461711067825681947947471001390843774746442699739386923285801022685451221261010798837646928092277556198145662924691803032880040492762442561497760689933601781401617086600593482127465655390841361154025890679757514060456103104199255917164678161972735858939464790960448345988941481499050248673128656508055285037090026439683847266536283160142071643015434813473463469733112182328678706702116054036618277506997666534567846763938692335069955755244438415377933440029498378955355877502743215305768814857864433151287
input integers must be under 311 digits
error -10 converting '16157656843214630540782260519598878842336783177348929017407633211352136367960754624019502746024050951385898980874283377584450132814889668660733557107718646717269919187065580712312669764271846738002252545316959285412725463851464957364202618156938105445898111049678293544614911782001260996619096541635426615416994048396440351774450929889526149184243170823801743838190255850762066419934793265761807935443211943570189162151130097426544085970837245081692161820084496939172274978131654443722015175417889899'
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0