Post Reply 
Largest Known Prime Number discovered
01-05-2018, 12:40 PM
Post: #1
Largest Known Prime Number discovered
Here is the link to GIMPS website that keep track of the ever larger Prime Number.

https://www.mersenne.org/primes/press/M77232917.html

Very interesting that they provide the software to crunch for the Prime Number.

Gamo
Find all posts by this user
Quote this message in a reply
01-05-2018, 01:24 PM
Post: #2
RE: Largest Known Prime Number discovered
(01-05-2018 12:40 PM)Gamo Wrote:  Here is the link to GIMPS website that keep track of the ever larger Prime Number.

https://www.mersenne.org/primes/press/M77232917.html

Very interesting that they provide the software to crunch for the Prime Number.

Gamo

Aww, that's nothing. My HP-65 can find that number in ..... well, I take that back!
Find all posts by this user
Quote this message in a reply
01-05-2018, 02:00 PM (This post was last modified: 01-05-2018 02:06 PM by pier4r.)
Post: #3
RE: Largest Known Prime Number discovered
One comment I read on reddit, that was infuriating "1995 called, they want the layout back".

When people look at the cover but not at the content.

edit:
out of the many variant of digital currencies that are being created, an interesting one that may compete with GIMPS is Primecoin: https://en.wikipedia.org/wiki/Primecoin

About digital currencies using proof of work, I don't like the fact that they use more and more energy in a planet were climate change and energy supply is already a problem. But can also be that their hunger for energy may create useful byproduct solutions. It happened already that as reaction of bad (or apparently bad) decisions good results were created.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
01-06-2018, 05:34 PM
Post: #4
RE: Largest Known Prime Number discovered
Wolfram Alpha gives up after a few seconds.


Regards,

John
Find all posts by this user
Quote this message in a reply
01-06-2018, 06:08 PM (This post was last modified: 01-06-2018 06:59 PM by Thomas Okken.)
Post: #5
RE: Largest Known Prime Number discovered
That's pretty lame. Raising X to the 77232917th power, using repeated squaring, takes 39 multiplications: 26 squares and 13 multiplications by X. That shouldn't take hours, even with millions of digits.

EDIT: Mathematica gets the exact result in a few seconds (MacBook Air, 1.6 GHz i5). Alpha refuses to show me more than 1845 digits.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-06-2018, 10:03 PM
Post: #6
RE: Largest Known Prime Number discovered
What would you answer to someone that says "what is the use of those large numbers? Why spending resources for them"?

Possible spoiler from another discussion platform.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
01-07-2018, 12:36 PM (This post was last modified: 01-07-2018 12:37 PM by pier4r.)
Post: #7
RE: Largest Known Prime Number discovered
(01-07-2018 01:10 AM)Mike (Stgt) Wrote:  I could now tell stories from work, how helpful my playing around and hanging out in forums was, but there is no gain to do so Wink

There may be gain for the reader. Please share!

I also agree with the reply. Trying something challenging, whatever it is, produces useful experience as byproduct of the action.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
01-07-2018, 01:23 PM (This post was last modified: 01-07-2018 01:38 PM by Thomas Okken.)
Post: #8
RE: Largest Known Prime Number discovered
(01-06-2018 09:10 PM)Mike (Stgt) Wrote:  
Code:
/* GTHMP.REXX: get that huge Mersenne prime */
/* display 2**n - 1 of argument n */
numeric digits 23300000
dummy = time('R')          -- start timer

p = x2b(d2x(arg(1)))       -- dec to bin
d = 1
do while p <> ''
   d = d * d               -- d**2
   parse var p f +1 p      -- get leftmost flag, keep rest of 'program'
   if f then d = d + d     -- 2 * d
end

say d - 1
say 'Time:' time('Elapsed')

I'm not familiar with rexx, but that implementation looks wrong. Here's what I use:

Code:
// Calculate r = y ^ x
// assuming x is a non-negative integer

r = 1
while (x ≠ 0) {
    if (x mod 2 ≠ 0)
        r = r * y
    y = y * y
    x = floor(x / 2)
}

EDIT: No, wait, yours is correct. It just handles the exponent's bits from left to right, while my algorithm handles them from right to left, which makes the whole thing look very different.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2018, 02:11 PM (This post was last modified: 01-07-2018 02:14 PM by Jurgen Keller.)
Post: #9
RE: Largest Known Prime Number discovered
(01-06-2018 10:03 PM)pier4r Wrote:  What would you answer to someone that says "what is the use of those large numbers? Why spending resources for them"?

Cryptography: Every time you enter your credit card number on the Internet to buy yet another HP calculator, prime numbers spring into action.

Nature also sometimes uses them: Some insects will live in the ground for a number of years, and come out after 13 or 17 years. Both 13 and 17 are prime numbers, and by emerging at these times, it makes it harder for predators to adapt and kill the insects, and therefore more of them survive. One bug that does this is the cicada.
(I'm not a biologist and just read that somewhere but it makes sense to me; and not related to large prime numbers only to properties of prime numbers)

Mental challenge and curiosity (which drives technological progress): Even with today’s great technology, we still have trouble finding them, or any sort of pattern associated with them.

There are many more reasons of course ...
Find all posts by this user
Quote this message in a reply
01-07-2018, 07:23 PM (This post was last modified: 01-07-2018 08:11 PM by Gerson W. Barbosa.)
Post: #10
RE: Largest Known Prime Number discovered
(01-05-2018 01:24 PM)Don Shepherd Wrote:  My HP-65 can find that number in ..... well, I take that back!

My HP-50g can evaluate M4253 (2^4253 - 1) in less than 30 seconds, but that one was discovered in November 1961.

4253

« 1 DUP ROT
START DUP +
NEXT 1 -
»

EVAL


->

19079700752443907380746804296952917366935699474994017739474188267352897978700505​37063680498355149002443034959549507097257621863112241488288119202169045422069607​44666169364221195289538436845390250168663932838805192055137154390912666527533007​30929268753909225704336251785736662469997540237546295449029325923330313733064353​15565397399219262014386064390200751747230290568382725050515719675946083500634044​95977660656269020823960825567012344189908927956646011998057988548630107637380993​51982658238978188813570540865304521965580175808125116408055460905746802820330871​87246540810553232158601896113912960304711084431467456719677663089258585472715073​11563765171008318248647110097614890313562856541784154881743146033909602737947385​05535596033185561454090008145637865906837031726769698000118775099549109035010841​70509179915621679722810701613059725180448720483313063837150948549384157385498946​06070722584737978176686422134354526989443028353644037187375385397838259511833166​41613432369566036767689772228791877342096898232608902615003151542416546211133752​74311548906663273749214462768335645197767976338755035486650939145564820314822488​83127023777039667707976559857333357013727342079099064400455741830654320379350833​23624581934882406478358569292488102197833297494990612266442137603468781535048499​1

PS: M23209, discovered in 1979, takes about 333 seconds (6987 digits long).
Find all posts by this user
Quote this message in a reply
01-07-2018, 09:02 PM (This post was last modified: 01-07-2018 09:02 PM by pier4r.)
Post: #11
RE: Largest Known Prime Number discovered
Thanks for sharing. I do not have similar experience but more often than not I solve a pressing problem (at work or at home) and I remind myself "Pier, experience will always pay off, no matter what".

I mean, I was able to consolidate the relationships in a team thanks to the gaming experience that I had pre 2012. That was really unexpected, but it happened.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
01-07-2018, 09:15 PM
Post: #12
RE: Largest Known Prime Number discovered
(01-07-2018 08:28 PM)Mike (Stgt) Wrote:  
(01-07-2018 12:36 PM)pier4r Wrote:  There may be gain for the reader. Please share!

Darn, I hoped my hint was helpful enough. Few examples:

About 30 years ago we got CADAM on IBM mainframe by management decision. In the department nobody cared about this new tool but me. I diligently tested all the examples in the manuals even the chief spoke out his impression, that I was only playing with this toy. Until the day he wanted to sell a solution to a customer that was hardly to explain with orthographic views only. So the best engineer and me produced under time pressure an isometric view with the encasement partially opened to show the internals of the machinery (a detail of a beater mill. That days we only had 2-1/2 D, no 3D. It was ready just in time the boss had to leave. And he came back with the order. He never said again that I was playing. (Of cause I was playing, it was fun and as side effect I did a good job.)

CADAM was stable, but not absolutely stable. A crash once a day was normal. To reset a crashed machine was manual doing, time consuming for the draughtsman, annoying for the IT staff. One of the IBM manuals I have read (at least the abstract to get what it could do) described a programmable operator (PROP). I asked the IT chieftain to grant me more rights and read the PROP manual again. From then on, when a CADAM user used CPU but did no IO within one minute "my" PROP assumed this user needs a restart. Success! Without calling and waiting for help the draughtsman could continue his work. -- Few weeks later the person in charge for the complete mainframe came back to me: 'How did you do that?"

In this two examples I did know -- by my curiosity -- about the available tools and adopted them to solve given problems. In the next example it is a bit different, I got a task but no immediate solution.

Boss told me 'you may ask for everything but not for staff'. The task was deliver documentation for the client, complete, in time and according to the delivery. One delivery could be 20'000 items and more. No problem if there are no changes during delivery. That days PC came up, 286 or 386, 40MB hard disks, Windows 3.1, later Win98, mainframe's days had been counted. I tried to use EXCEL to manage the changes, it worked for tables with up to 10 items, alas with 20'000 items no result over night. Not at all a comfortable situation. Luckily with the latest VM/CMS came a system called Pipelines. Due to the failing EXCEL I took a closer look and found, it incorporates all fundamentals to compare files and brush up the results, but I have to analyse the task to the depth before I may assemble a pipe that helps. Result: tables with 20'000 rows and 65 columns took 30 seconds to compare and mark discarded and new items, get a new table of content, list for the departments what is missing, information for the management about the progress.
The mailing list about this Pipelines was very effective, no noise, problems solved within 5..8 appends, mostly the same day, I learned a lot from it. And of cause I am proud that I once could deliver a stable test case for a rare error.

Now I described in many words how helpful my playing around and hanging out in forums was, I hope your gain was worth it.

Ciao.....Mike

Excellent answer, Mike, thanks.

I think most of us have had situations where we got overly familiar with a new product and achieved something good or great. For the 1980 Census my boss asked me to build a system that would evaluate the workflow of a processing operation: station A could process 140 items per hour for one person, the output would go to station B which could process 22 items per hour for one person, and so on down the line. The question was how many people would you need at each station to keep the work flowing, and avoid a backlog, in the shortest possible time. A spreadsheet could handle this easily, but there was no Excel or Visicalc in 1978, so I built the model in FORTRAN on the Univac 1108 and it worked like a charm (if memory serves, which it doesn't always).

Things that make you really think are always good for you.
Find all posts by this user
Quote this message in a reply
01-07-2018, 09:36 PM
Post: #13
RE: Largest Known Prime Number discovered
(01-07-2018 09:15 PM)Don Shepherd Wrote:  
(01-07-2018 08:28 PM)Mike (Stgt) Wrote:  Darn, I hoped my hint was helpful enough. Few examples:

About 30 years ago we got CADAM on IBM mainframe by management decision. In the department nobody cared about this new tool but me. I diligently tested all the examples in the manuals even the chief spoke out his impression, that I was only playing with this toy. Until the day he wanted to sell a solution to a customer that was hardly to explain with orthographic views only. So the best engineer and me produced under time pressure an isometric view with the encasement partially opened to show the internals of the machinery (a detail of a beater mill. That days we only had 2-1/2 D, no 3D. It was ready just in time the boss had to leave. And he came back with the order. He never said again that I was playing. (Of cause I was playing, it was fun and as side effect I did a good job.)

CADAM was stable, but not absolutely stable. A crash once a day was normal. To reset a crashed machine was manual doing, time consuming for the draughtsman, annoying for the IT staff. One of the IBM manuals I have read (at least the abstract to get what it could do) described a programmable operator (PROP). I asked the IT chieftain to grant me more rights and read the PROP manual again. From then on, when a CADAM user used CPU but did no IO within one minute "my" PROP assumed this user needs a restart. Success! Without calling and waiting for help the draughtsman could continue his work. -- Few weeks later the person in charge for the complete mainframe came back to me: 'How did you do that?"

In this two examples I did know -- by my curiosity -- about the available tools and adopted them to solve given problems. In the next example it is a bit different, I got a task but no immediate solution.

Boss told me 'you may ask for everything but not for staff'. The task was deliver documentation for the client, complete, in time and according to the delivery. One delivery could be 20'000 items and more. No problem if there are no changes during delivery. That days PC came up, 286 or 386, 40MB hard disks, Windows 3.1, later Win98, mainframe's days had been counted. I tried to use EXCEL to manage the changes, it worked for tables with up to 10 items, alas with 20'000 items no result over night. Not at all a comfortable situation. Luckily with the latest VM/CMS came a system called Pipelines. Due to the failing EXCEL I took a closer look and found, it incorporates all fundamentals to compare files and brush up the results, but I have to analyse the task to the depth before I may assemble a pipe that helps. Result: tables with 20'000 rows and 65 columns took 30 seconds to compare and mark discarded and new items, get a new table of content, list for the departments what is missing, information for the management about the progress.
The mailing list about this Pipelines was very effective, no noise, problems solved within 5..8 appends, mostly the same day, I learned a lot from it. And of cause I am proud that I once could deliver a stable test case for a rare error.

Now I described in many words how helpful my playing around and hanging out in forums was, I hope your gain was worth it.

Ciao.....Mike

Excellent answer, Mike, thanks.

I think most of us have had situations where we got overly familiar with a new product and achieved something good or great. For the 1980 Census my boss asked me to build a system that would evaluate the workflow of a processing operation: station A could process 140 items per hour for one person, the output would go to station B which could process 22 items per hour for one person, and so on down the line. The question was how many people would you need at each station to keep the work flowing, and avoid a backlog, in the shortest possible time. A spreadsheet could handle this easily, but there was no Excel or Visicalc in 1978, so I built the model in FORTRAN on the Univac 1108 and it worked like a charm (if memory serves, which it doesn't always).

Things that make you really think are always good for you.

I worked for HEAP (Home Energy Assistance Program) in Onondaga County, New York. I was given the task of going over all the social security numbers of all the clients HEAP ever had and check to see if there were any people receiving duplicate benefits or otherwise ineligible for benefits. I was given access to a room full of paper files and eight weeks to check them all. I knew that all records were also stored online so I asked for and got access to the online database. After writing a program to automate my task, the computer did all the cross-checking in about three hours. The Commissioner was astounded. He asked why this hadn't been done before. I told him that it was because I had just started working for HEAP. From then on, I was his go-to IT guy. The actual IT department wasn't too pleased but with the backing of the Commissioner, I could ask for and get almost any computing services I wanted. I did almost end up in jail, though! I was demoing a license plate lookup program that accessed the NYSDMV (Department of Motor Vehicles) database. To show off, I entered the license plate number of Governor George Pataki. In a few minutes an agent from the State Police's BCI (Bureau of Criminal Investigation) was in my office wanting to know why I was accessing the Governor's info. Luckily, everyone at the demo vouched for me telling him it was just a demo.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
01-09-2018, 01:17 AM
Post: #14
RE: Largest Known Prime Number discovered
(01-07-2018 07:23 PM)Gerson W. Barbosa Wrote:  My HP-50g can evaluate M4253 (2^4253 - 1) in less than 30 seconds,
...
4253

« 1 DUP ROT
START DUP +
NEXT 1 -
»

EVAL

...
PS: M23209, discovered in 1979, takes about 333 seconds (6987 digits long).

Actually the first example can be evaluated in less than 5 seconds by doing simply 2 4253 y^x 1 -. The second example, however, causes the calculator to return an error message ( ^ Error: Integer too large ).

It's interesting to notice how execution is slowed down when DUP + is replaced with 2 * (2 SWAP * is better, but still worse than DUP + ).

It appears M216091 (65050 digits) is the most we can get on the 50g (642.4 seconds on the emulator, perhaps about 7 hours on the calculator).
Find all posts by this user
Quote this message in a reply
05-16-2019, 12:04 PM
Post: #15
RE: Largest Known Prime Number discovered
Display all decimal digits of M77232917 is not easy.

This blog (dated 2013) tried various way to do a smaller M57885161

Binary to Decimal Conversion: how hard can it be ?

BTW, in only 1 year, Mersenne Prime #51 Found! M82589933
Find all posts by this user
Quote this message in a reply
05-26-2019, 09:38 AM
Post: #16
RE: Largest Known Prime Number discovered
(05-16-2019 12:04 PM)Albert Chan Wrote:  Display all decimal digits of M77232917 is not easy.

This blog (dated 2013) tried various way to do a smaller M57885161

Binary to Decimal Conversion: how hard can it be ?

BTW, in only 1 year, Mersenne Prime #51 Found! M82589933

? wow ! I don’t have any idea of the time my HP35S would take to calculate this number !!!
Find all posts by this user
Quote this message in a reply
05-27-2019, 08:36 PM
Post: #17
RE: Largest Known Prime Number discovered
(01-07-2018 07:23 PM)Gerson W. Barbosa Wrote:  
(01-05-2018 01:24 PM)Don Shepherd Wrote:  My HP-65 can find that number in ..... well, I take that back!

My HP-50g can evaluate M4253 (2^4253 - 1) in less than 30 seconds, but that one was discovered in November 1961.

4253

« 1 DUP ROT
START DUP +
NEXT 1 -
»

EVAL


->

19079700752443907380746804296952917366935699474994017739474188267352897978700505​37063680498355149002443034959549507097257621863112241488288119202169045422069607​44666169364221195289538436845390250168663932838805192055137154390912666527533007​30929268753909225704336251785736662469997540237546295449029325923330313733064353​15565397399219262014386064390200751747230290568382725050515719675946083500634044​95977660656269020823960825567012344189908927956646011998057988548630107637380993​51982658238978188813570540865304521965580175808125116408055460905746802820330871​87246540810553232158601896113912960304711084431467456719677663089258585472715073​11563765171008318248647110097614890313562856541784154881743146033909602737947385​05535596033185561454090008145637865906837031726769698000118775099549109035010841​70509179915621679722810701613059725180448720483313063837150948549384157385498946​06070722584737978176686422134354526989443028353644037187375385397838259511833166​41613432369566036767689772228791877342096898232608902615003151542416546211133752​74311548906663273749214462768335645197767976338755035486650939145564820314822488​83127023777039667707976559857333357013727342079099064400455741830654320379350833​23624581934882406478358569292488102197833297494990612266442137603468781535048499​1

PS: M23209, discovered in 1979, takes about 333 seconds (6987 digits long).

The HP-50g with newRPL (build 1255) installed computes M4253 in 28.46 milliseconds.

Larger primes can be computed but full precision can be achieved only if the resulting number is shorter than 2000 digits, the maximum precision allowed. Larger numbers can be computed (MAXR is 1e30000) but the mantissa is rounded at 2000 digits (newRPL uses 16 guard digits).

Anyway here's more benchmarks, and the code I used:

M4253: 28.46 ms
M4423: 29.4 ms (largest at full precision)
M23209: 196.64 ms
M86243: 318.12 (largest before overflow)

Code:

«
  GETNFMT SWAP
  "#.A#" SETNFMT
  2000 SETPREC
  DUP
  "M" SWAP →STR ": " + +
  SWAP

  «
    2 SWAP ^ 1 -
  »
  TEVAL

  1_s * 1_ms CONVERT UNROT
  →STRE
  DUP STRLEN
  "DIGITS: " SWAP +
  UNROT +
  4 ROLL SETNFMT
»

The digits count is off-by-1 for approximated results because of the trailing dot that newRPL adds to the result to highlight the fact the number is approximated.
Find all posts by this user
Quote this message in a reply
05-27-2019, 09:29 PM
Post: #18
RE: Largest Known Prime Number discovered
<< 2 4253 ^ 1 - >> takes less than 4.5 seconds on my 50g.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)