mersenneforum.org Moved from Number Theory, it has no reason to be there
 Register FAQ Search Today's Posts Mark Forums Read

2021-01-06, 05:20   #1
ONeil

Dec 2017

24·3·5 Posts
Moved from Number Theory, it has no reason to be there

Quote:
 Originally Posted by diep I'm busy sieving 32767 * 2 ^ n - 1 very deeply now (and busy testing it at the first few millions of bits or so - each time narrowing down the boundaries of the sieve domain). Well deeply -that's as far as the hardware allows here. Nowhere nearby what PG manages to achieve of course. What i notice is that to my surprise it keeps finding factors and removing exponents also at higher bitlevels. Whereas other riesels with a similar nash weight dry up much sooner. Would the guess be logical to assume then odds for a prime is also much lower than similar nashed k's?
Hi diep I don't know if this matters or not, but I looked at your formula and I thought it could factor Mersenne numbers from what you said and to my surprise it does with the aid of python.

Here is the code:

Code:
import time
print('''diep factor method''')
while True:
start_time = time.time()
n = int(input('Enter a prime number: '))
f = ((n) * (pow(2,n-1)*2-1))
diep = (pow(2,n-1)*2-1)
def isqrt(c):

x = c
y = (x + 1) // 2
while y < x:
x = y
y = (x + c // x) // 2
return x
c = (floor(c))

for x in range(1,(isqrt(diep))):
if f%((x*n+1)) == 0 :
print((x*n+1))
e = int(time.time() - start_time)
print('{:02d}:{:02d}:{:02d}'.format(e // 3600, (e % 3600 // 60), e % 60))
break

2021-01-06, 05:35   #2
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

25·5·41 Posts

Quote:
 Originally Posted by ONeil ... I don't know if this matters or not ...

All you have there yet another version of your useless trial factoring code.

2021-01-06, 07:24   #3
LaurV
Romulan Interpreter

"name field"
Jun 2011
Thailand

17·19·31 Posts

Quote:
 Originally Posted by retina The answer is "not".
Yep. Moved to blogorrhea.

 Similar Threads Thread Thread Starter Forum Replies Last Post jwaltos Miscellaneous Math 2 2019-08-07 09:54 Nick Number Theory Discussion Group 17 2017-12-23 20:10 mfgoode Puzzles 2 2006-05-30 09:46 math Homework Help 2 2004-05-02 18:09 hyh1048576 Puzzles 0 2003-09-28 15:35

All times are UTC. The time now is 11:57.

Mon Aug 15 11:57:07 UTC 2022 up 39 days, 6:44, 1 user, load averages: 0.52, 1.01, 1.00