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.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
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...
Back
Top