20201230, 08:19  #1 
Dec 2017
2^{4}·3·5 Posts 
Sorry about last post I hope u like this new factor method
I have found that ratios of numbers are related to factors of numbers in the form of 2^n1.
Go here: https://goodcalculators.com/ratiocalculator/ Now put in 1:37 and check number 6 its 222 add 1 and you get the factor for 2^371. So I built my factoring code in python around that premise, based on ratios. It can process 2^671 in 9 seconds. 2^1011 is still slow, because its a big factor. HAPPY NEW YEAR, My Apologies everyone for all the crap you have had to deal with from me if I pissed you off in 2020. I hope to be better in 2021. Code:
from decimal import * from math import floor, sqrt import time while True: def isqrt(n): x = n y = (x + 1) // 2 while y < x: x = y y = (x + n // x) // 2 return x n = (floor(n)) start_time = time.time() b = int(input(' Enter a number: ')) s = (pow(2,b1)*21) n = (((isqrt(s)))) for x in range(1,n): if (pow(2,b1)*21)%(b*x+1) ==0: print(b*x+1,'This is the factor of a number 2^number1') e = int(time.time()  start_time) print('{:02d}:{:02d}:{:02d}'.format(e // 3600, (e % 3600 // 60), e % 60)) break 
20201230, 08:51  #2 
Undefined
"The unspeakable one"
Jun 2006
My evil lair
6,143 Posts 
No need for such complication.
I guarantee this is faster: Code:
p = 67 k, n = 1, 1 << p while k * k < n: k += p + p if pow(2, p, k) == 1: print(k) break 
20210102, 16:46  #3 
Romulan Interpreter
Jun 2011
Thailand
2^{2}·17·139 Posts 

20210102, 17:02  #4 
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
7·37^{2} Posts 
Here is a tip/challenge/request to the OP.
Don't post anything more until your very slow LL test completes. Spend the time on seeing why the current factoring methods are better than anything you come up with. Python might be a fun language to play with, but if you are worried about how to factor quickly, you will need to learn a language that is closer to the metal and compiles. If you want to find factors for Mersenne numbers, look at all the work that has been done to exclude candidate factors. And look at the ways that previous tests have used smart programming to speed up tests. Then look at how programs like Prime95 exploit advanced CPU instructions to further speed things up. 
20210102, 20:01  #5  
Feb 2017
Nowhere
2·2,273 Posts 
Quote:


Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Is there hope for the GPU shortage on the horizon?  tServo  GPU Computing  15  20180308 22:20 
Hope I'm not OT...  ET_  Linux  14  20161101 15:46 
Finding Cancer Hope in a Toxic Wasteland  ewmayer  Science & Technology  62  20071111 04:05 
Fermat's Last Theorem: a new hope  ET_  Math  36  20051110 22:15 
Post the numbers you have tried to factor here  hyh1048576  Factoring  11  20031201 07:37 