MHB Large Prime number unable to compute

  • Thread starter Thread starter Kruidnootje
  • Start date Start date
  • Tags Tags
    Prime
Kruidnootje
Messages
24
Reaction score
0
Using Wolfram I was able to make certain that the following number was a Prime:

123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901

However finding its position in Wolfram was not possible, (Unless I should have left my computer on all night but I don't know if that would work either I did sit there for 10 minutes or so). Also I have no idea how to ascertain whether this prime is truly the first in this particular series. I believe it is. It is 171 digits long and has 17 rows of 1-0 ending in a 1.

Does anyone have any suggestions please?
Kind regards
Chris
 
Mathematics news on Phys.org
What do you mean by "finding its position"? You want to find out which prime it is? As in, $2$ is the first prime, $3$ is the second, ..., $127$ is the thirty-first, and yours is the $n$th?

Also, I'm not sure what you mean by "this particular series". Can you please expand on that?

Assuming that by "finding its position", you mean finding out how many primes are smaller than it, your prime number is certainly very large. It's too large for the
Code:
PrimePi
function. You might consider enclosing the Wolfram command
Code:
CurrentPrime=NextPrime[CurrentPrime]
in a loop, and count the number of iterations until CurrentPrime gets to your number. That is, your code would look like this:
Code:
MyPrime=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901;
LoopCounter=1;
CurrentPrime=2;
While[CurrentPrime<MyPrime,CurrentPrime=NextPrime[CurrentPrime];LoopCounter++;];
LoopCounter
I've tested this code on smaller primes, and it's correct. I have no idea how long it will take, though. You could test it out gingerly on some much lower primes (which you can get with the
Code:
Prime
function).
 
Ackbach said:
What do you mean by "finding its position"? You want to find out which prime it is? As in, $2$ is the first prime, $3$ is the second, ..., $127$ is the thirty-first, and yours is the $n$th?

Yes.

Also, I'm not sure what you mean by "this particular series". Can you please expand on that?

Well this obviously not the first prime. So I had to clarify this as the first prime by the use of the word 'series' ie. 12345678901234567890 and so on.

Assuming that by "finding its position", you mean finding out how many primes are smaller than it, your prime number is certainly very large. It's too large for the
Code:
PrimePi
function. You might consider enclosing the Wolfram command
Code:
CurrentPrime=NextPrime[CurrentPrime]
in a loop, and count the number of iterations until CurrentPrime gets to your number. That is, your code would look like this:
Code:
MyPrime=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901;
LoopCounter=1;
CurrentPrime=2;
While[CurrentPrime<MyPrime,CurrentPrime=NextPrime[CurrentPrime];LoopCounter++;];
LoopCounter
I've tested this code on smaller primes, and it's correct. I have no idea how long it will take, though. You could test it out gingerly on some much lower primes (which you can get with the
Code:
Prime
function).

Thankyou I will give this a bash. But I now know that this is the first prime ever in this 'series' so just need to find out in what position it is, ie what nth prime is this overall. Thanks though for the tip.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.
Back
Top