You are not logged in.

- Topics: Active | Unanswered

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

Consider this equation.

Where Ps is the resulting Prime and n & p are integers.

If t=1, this equation reduces to the known prime (Refer OEIS) as follows:

Selecting the values of t and n for odd/prime Ps, yields the following example

Which is a prime of approximately 14,700 Digits.

By the way, does anyone know how to calculate how many digits this number is on Mathematica?

*Last edited by Stangerzv (2013-06-15 15:02:15)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

It has 14734 digits.

In Mathematica, this is simplest.

N[8^16315 - 7^16315 - 6^16315 - 5^16315 -4^16315 - 3^16315 - 2^16315, 20]

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

And PrimeQ[8^16315 - 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315] agrees that the result is prime.

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

**Online**

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

Thanks bobbym and phrontister..alpertron won't work due to out of range.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Use this in Mathematica for a proof of the primality of a number:

Needs["PrimalityProving`"]

ProvablePrimeQ[

8^16315 - 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315]

But it may take a long time!

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

Thanks bobbym..I would run on my computer.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I turned it off after around 10 minutes. May take hours or days...

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

bobbym wrote:

In Mathematica, this is simplest.

N[8^16315 - 7^16315 - 6^16315 - 5^16315 -4^16315 - 3^16315 - 2^16315, 20]

This one seems good too:

IntegerLength[8^16315 - 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315]

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

How about this one?

8^16315.- 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

Yes...works too. What does the dot after the 5 do?

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

It tells M that number is done in floating point. This is much faster then exact arithmetic. Once M does one bit of an expression in floating point, it does the rest in it too.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

Oh, I see. Interesting option.

I recently installed a freeware Add-In into Excel that enables multi-precision floating point calcs up to 32760 significant digits. It was fine for what I was working on but it has some whiskers too, so I've disabled it.

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

That is interesting. I have been playing a little with geogebra's spreadsheet. If only they would interface geo with maxima a little better.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

It seems that once the value of p becoming larger, you can simply taking log on the first term to get the digits. So, the number of digits=16315log8=14733.91.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Yep, that will will give an approximation ala Landau Notation.

But why settle for an approximation when you can get the exact answer?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

I was not sure, until you gave me the exact value, which is more less the value by taking log on the first term.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Mathematically, it is correct to approximate it using just the first term when n is large.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

bobbym wrote:

Use this in Mathematica for a proof of the primality of a number:

Needs["PrimalityProving`"]

ProvablePrimeQ[

8^16315 - 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315]But it may take a long time!

I didn't know that, so I looked it up and found this help file: PrimalityProving/tutorial/PrimalityProving

Near the end of the article it says "PrimeQ will be, in general, several orders of magnitude faster than ProvablePrimeQ." My PrimeQ test on this number took just under 6 minutes...but of course it doesn't give the mathematical proof (which I can't follow, anyway, having tested the function on a smaller prime and finding the proof too advanced for me).

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Since the WZ algorithm they now use certificates to prove when an algorithm gave the right answer. I do not understand it either.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,562

phrontister wrote:

IntegerLength[8^16315 - 7^16315 - 6^16315 - 5^16315 - 4^16315 - 3^16315 - 2^16315]

This form helped in another program of mine where I needed to plug the number of digits into another calculation, which I did via len=IntegerLength[a].

I guess that could also be done with other methods, but the one above seemed to be a simple option.

**Online**

**Stangerzv****Member**- Registered: 2012-01-30
- Posts: 252

I have tested up to n=30,000 no prime so far. I would run up to n=200,000 and lets see whether there would be more prime or not.

Offline