Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

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

Hi Stangerzv,

For P = 5 I get a different answer from the one in your first post:

*Last edited by phrontister (2013-04-23 05:20:32)*

"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

Offline

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

Hi,

For P=19

*Last edited by phrontister (2013-04-23 11:16:23)*

"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

Offline

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

Hi,

For P=13

*Last edited by phrontister (2013-04-23 11:16:05)*

"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

Offline

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

A couple more (hope I'm doing this right)!

For P=23

For P=29

*Last edited by phrontister (2013-04-23 11:15:48)*

Offline

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

Hi Stangerzv;

For P = 2, 2^2 ± 1 = {3,5} which is smaller.

For P = 5, phrontister is correct. The solution in post #1 is incorrect.

are not both prime.

Hi phrontister;

Very good work!

**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,793

Hi Bobby,

Thank you.

Yes, my original program found that small answer for P=2, but later when I saw the larger answer in Stranerzv's first post and reread the post I thought (correctly or incorrectly) that "consecutive primes" meant there should be multiple primes in the answer...and so I changed my program to what it is now.

I don't really understand that sigma notation very well (even though stefy told me how it worked) and so I couldn't tell from the one in post #1 whether or not I made the right decision. I copied the sigma thingy from your post and used it for mine.

Offline

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

Hi;

It is just a shorthand for summation.

For P = 31

**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,793

Thanks...I remember now. But can you tell from that if the answer should contain multiple primes?

Offline

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

I'm off to bed now...but I've set the program to test a larger number that might take it a while.

Offline

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

But can you tell from that if the answer should contain multiple primes?

I am not following you, can you explain?

**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,793

For the short version of P=2 there's only one Pi, which means the answer doesn't contain the "consecutive primes" mentioned in post #1. But I'm pretty sure that I've misunderstood the intent and that a single Pi is fine...which means I should change my code back to what it was originally.

Offline

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

I thought the pair meant the plus minus of n.

**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,793

Here's my answer for the lowest 3-digit Prime-th Power.

For P=101

*Last edited by phrontister (2013-04-23 11:15:01)*

Offline

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

Hi Bobby,

I thought the pair meant the plus minus of n.

I was referring to this, from post #1:

Where all Pi are the consecutive primes

I'd still think that a single Pi is valid, though, even though it isn't a 'consecutive' series.

Offline

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

Hi phrontister

Thanks for the solutions, 2^2+-1=3,5 it is part of the solutions, in which I overlooked it, it seems the equation can generate larger primes and it is becoming more interesting.

bobbym, I am drafting a research grant for my prime equations, that is why I put on hold for the grid computing. It would be kool to have a facility that could run very big calculations at a faster rate. I have more prime equations, I am trying to get a research grant to study them and maybe trying to find the largest primes as alternative to Mersenne in the future. This is one of the prime equations that could give big Prime at a smaller prime number input, the derivation of the equation is simple.

(10002^214+10003^214)/(10002^2+10003^2)=849 Digits Prime and (10002^562+10003^562)/(10002^2+10003^2)=2241 Digits Prime.

*Last edited by Stangerzv (2013-04-23 11:24:42)*

Offline

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

Hi;

Good luck with the grant.

As far as this problem is concerned I think there will always be a solution it is just a matter of going far enough.

**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,793

Hi Bobby,

Here is my M code. Got any suggestions to improve it? It finds P=13 in just under 7 seconds.

Is yours much different? Mine is very raw, just looking for the answer without any fancy output formatting.

I enjoyed writing the code, and learnt some new things (eg, 'Break', 'PrimeQ', 'NextPrime', the table of primes, and better understanding of 'If').

*Last edited by phrontister (2013-04-23 23:20:30)*

Offline

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

Hi;

**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,793

Thanks for that, Bobby...but I don't understand it. I suppose that yours is a functional approach, and my procedural brain can't grasp that yet. My code's just LB under the M hood.

I'm trying to use the help files to work out what it all means, but it's slow going.

What does the answer 2763 represent? Also, entering higher upper limits give further answers after the initial 2763, but I don't know what they mean either...or even if they're supposed to be there.

Or maybe I should wait for your final version before going further with this.

*Last edited by phrontister (2013-04-24 13:17:43)*

Offline

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

Hi phrontister;

The 2763 is the first answer for P = 7. Other numbers just mean there are more than one answer further down.

**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,793

Hi Bobby,

Yes...I worked that out soon after I asked.

Your code is excellent for finding multiple solutions!

When I tried P=13 the quickest time with your code was about 11 seconds, compared to about 7 seconds with mine. I don't know how to tweak yours to make it faster.

I suppose the main flaw is having to guess the upper limits, and the more accurate your guess the closer you are to the minimum processing time. 'Break' stopped my procedural program when the answer was found, but I don't know how to exit early with your code.

I played around with your code for printing the results:

*Last edited by phrontister (2013-04-24 16:29:07)*

Offline

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

Hi;

Yes, getting it to stop is something I am working on. Unfortunately connection problems have kept me on the

phone all day and I got nothing done.

**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,793

Btw, the code in my previous post only works for t>=f, otherwise it prints an error (c.f. your original code, which just prints a blank if the upper limit is too low).

Edit: I just got an error message (not just a blank) with your original code for P=101, so what I said in the para above isn't quite right.

*Last edited by phrontister (2013-04-24 17:07:10)*

Offline

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

Also, I used t for the two upper limits as I couldn't see any reason for them to differ. That cuts the time down a bit.

Offline

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

Hi;

I am working on an idea to improve it but the problems with the connection just won't stop.

**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