 Someone to help me find large prime number? | SoloLearn: Learn to code for FREE!

+4

# Someone to help me find large prime number?

I were thinking about prime numbers and I found something... I want to test it... there are prime number 3, 7, 127 - these primes have something in common all are only 1 in binary, next should be 170141183460469231731687303715884105727 (2^128-1), online prime testers confirmed that, this leads me to the point - next prime number in sequence should be 2^170141183460469231731687303715884105728-1

+2

You found the Mersenne primes. A binary with only 1 is a decimal 2**n-1. A Mersenne number If it is a prime it is a Mersenne prime.

+2

Your number is the 5th Catalane-Mersenne number (https://mathworld.wolfram.com/Catalan-MersenneNumber.html). It is not currently known if it is a prime or not (after all, the largest known prime is "just" 2^82589933 - 1). It is known that this number has no prime factors below 10^51 (it is is obvious that it doesn't have any factors below 2^127 - 1, for otherwise 2^127-1 would be composite itself -- i guess they continued this train of to 10^51 - showing that there is no prime p up to 10^51 such that 2^k modulo p can have exactly 2^127-1 different values)

+2

If your modulo is small enough that you can fit it in memory you can calculate 2^(2^127-1) mod p by 127 repeated squarings and a (modular) division by 2 at the end. The problem is that we know that "interesting" numbers p are also large, and also that there's a huge number of them. You can, of course, try testing divisibility by primes P satisfying the following necessary conditions: P>10^51 P=2k * (2^127-1) + 1 maybe you'll have a lucky guess and find a divisor. Smarter methods of prime testing require calculations modulo the number you are testing, and i guess here we are out of luck - while the number itself has a simple description, the intermediate results may be anything up to this number, and that will not fit in any reasonable amount of memory

+1

Yes and if u discovered yourself..... Looks like you are mathematican

+1

Well... It's complicated even getting this number, because of it's size... So I gues It'll take a lot time to calculate but I gues that it should be easier than other primes since it's all same in binary, so it can be divided part by part and don't have to be memorized whole (just size of dividing number), but it's not possible as decimal number, only in binary

+1

Well... During calculation we can save highest part of number and how far it's from 0, that makes it possible to do testing up to size of memory... To do it fast would be good do begining with ram, but for further test... There Will be need of using hdd... And here comes a big problem

+1

And I gues that there is no memory which could store such large number as squere root of this

+1

So these days we can't fully test it

+1

The mathmatice is very advanced all codes java script in learning java

+1

nicolas turek i worked on divisibility and binaries with FSM. It was exciting. https://code.sololearn.com/cjR8Y5Ijn9iO/?ref=app

+1

I would be more for python than javasvript, since python is better at large number operations... But maybe I'll do it in C since even Python number size limit is not enough

+1

0

Maybe it's prime, maybe not... I would gues it is, but it's number with size of... You see there, you would need really big memory to store such a huge number, so this is not way to calculate it... Only thing I know is it is number with 1701...5727 digits in binary and all are 1...

0

At least it's really interesting number sequence :D

0

More programmer, it's from binary -> you take 11 (that's 3) and use this amount of 1 in next number -> 111 (7) -> 1111111(127)... Reason for these to be primes could be, that they actually all were done by not being possible to diveded by previous (so my number surely is not divideable by these + 2...), Now I need code to divide binary which will remeber only in which part of this number it is and rest begining at left side... So I'll need my own modulo function

0

cool finding! i wonder: could you test it thru the Sieve of Eratosthenes?

0

nicolas turek o ok lol no problem