MHB Large Prime number unable to compute

  • Thread starter Thread starter Kruidnootje
  • Start date Start date
  • Tags Tags
    Prime
AI Thread Summary
A user confirmed that a specific large number is prime but struggled to find its position among other primes using Wolfram. The number in question is 171 digits long, and the user sought clarification on how to determine its ordinal position among all primes. Suggestions included using a loop in Wolfram to count iterations of the NextPrime function until reaching the specified number. The user acknowledged that this number is the first prime in a particular series and expressed intent to find its overall position. The discussion focused on computational methods for large prime identification and ordinal ranking.
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.
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
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...
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...
Back
Top