20201023, 05:32  #12 
Romulan Interpreter
Jun 2011
Thailand
5^{2}·7·53 Posts 
...are the number itself and 1.
I think you only trolling, because I can't imagine a real person can behave the way yo do, so ignorant and so proud in the same time. Take the advice other people gave you, and start learning something serious. 
20201023, 07:56  #13  
Dec 2017
11110000_{2} Posts 
This is super fast don't listen to them
I think they have the inside scoop.
I have found the machine for finding factors very fast. You need to make a list of many primes that are at least 10 digits long or greater than the average for factors found length. That's work I know, but when you are done you save time. Instead of a month processing your machine will come back in seconds with a factor. Now granted its about your list so you could miss a factor. At least if you miss a factor you could either make you list bigger or test that number to see if its prime here is the code. This code opens the list in a text file and uses it as mod against your test 2^p1. Here you can at least assess the average factor length: https://www.mersenne.org/report_fact...xp_lo=12354673 Here is a small portion of my list inside the text file: Quote:
Code:
import timeit while True: p = int(input("Enter a prime number: ")) if p == 1: print(p,"Come on man type a larger number or vote for Biden, because he is number 1") continue if p == 2: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 3: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 5: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 7: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 13: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 17: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 19: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 31: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 61: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 89: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 107: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 127: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 521: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 607: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 1279: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 2203: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 2281: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 3217: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 4253: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 4423: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 9689: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 9941: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 11213: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 19937: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 21701: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 23209: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 44497: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 86243: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 110503: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 132049: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 216091: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 756839: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 859433: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 1257787: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 1398269: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 2976221: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 3021377: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 6972593: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 13466917: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 20996011: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 24036583: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 25964951: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 30402457: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 32582657: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 37156667: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 42643801: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 43112609: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 57885161: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 74207281: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 77232917: print(p,"The input 'p' produces a Mersenne Prime") continue elif p == 82569933: print(p,"The input 'p' produces a Mersenne Prime") continue with open("C:\python37\k.txt",'r') as f: primes = f.read().split("(")[1].split(')')[0].split(',') # int list of primes primes = [int(i.strip()) for i in primes] for prime in primes: if (2**p  1) % int(prime) == 0: start_time = timeit.default_timer() print(prime) print(timeit.default_timer()  start_time,'seconds') break Last fiddled with by ONeil on 20201023 at 08:06 

20201023, 08:02  #14 
"Viliam Furík"
Jul 2018
Martin, Slovakia
386_{10} Posts 
This works with only k=1, thus if it divides 2^{p}1, it is definitely a prime factor.
Last fiddled with by Viliam Furik on 20201023 at 08:04 
20201023, 08:04  #15 
Dec 2017
2^{4}×3×5 Posts 
LaurV you are not a decent person you misquoted me you now have no respect from me you stoop very low indeed!

20201023, 08:07  #16  
"Viliam Furík"
Jul 2018
Martin, Slovakia
386_{10} Posts 
Quote:
If you mean the Mersenne numbers... Those can be composite. Mersenne primes are a very rare special case of those numbers. 

20201023, 08:07  #17 
Sep 2002
Database er0rr
2×3×599 Posts 
https://www.w3schools.com/python/python_sets.asp shows how to use sets in python. So you write something like:
Code:
known_mersenne_primes = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161, 74207281, 82569933} Code:
if p in known_mersenne_primes: print(p,"The input 'p' produces a Mersenne Prime") 
20201023, 08:13  #18  
Dec 2017
2^{4}·3·5 Posts 
Quote:


20201023, 08:20  #19  
Dec 2017
240_{10} Posts 
Quote:
Primes that make numbers from 2^p1 which are not prime have factors that are prime, sorry for the confusion. 

20201023, 08:24  #20 
Dec 2017
2^{4}·3·5 Posts 
A better way to phrase it would be:
A composite number produced from a prime number using 2^p1 does contain prime factors! 
20201023, 08:51  #21 
"Viliam Furík"
Jul 2018
Martin, Slovakia
2·193 Posts 
No, it is not. It is what you meant by it, but not what you actually said. But I understand now.
But there's a little sense in saying that. If the Mersenne number (2^{p}1) is prime, there is no discussion about factors. If it's not a prime, well, the only other option is that it is composite, which means it does have prime factors, but if it has strictly more than 2 of them (all the time, except for a very small part of those numbers), then the product of any two prime factors is also a factor, but a composite one. 
20201023, 08:57  #22 
Sep 2002
Database er0rr
2·3·599 Posts 
It is of absolutely no use in reading in a list of factors. The factors of Mersenne numbers with prime exponents is disjoint: a prime dividing one Mp will not divide another Mq.
Reading in from disk takes time too, It is better to loop over k for 2pk+1. For example M11 is (2*11+1)*(2*4*11+1) Going up to "10 digits" is pathetic. The guys (an gals) here go up to over 24 digits routinely. Last fiddled with by paulunderwood on 20201023 at 09:05 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
largest n such that n^2+1 has prime factors within a set  fivemack  Abstract Algebra & Algebraic Number Theory  8  20201001 14:36 
Checking that there are no prime factors up to x  CRGreathouse  Math  14  20170922 16:00 
Prime factors of googolplex  10.  Arkadiusz  Factoring  6  20111210 15:16 
Are all factors prime?  kurtulmehtap  Math  4  20100902 19:51 
Distribution of Mersenne prime factors mod 6  alpertron  Math  0  20060623 20:07 