David Sycamore

95 Reputation

4 Badges

6 years, 12 days

MaplePrimes Activity


These are replies submitted by David Sycamore

@Carl Love 

Have now run full code in 1D and also run truncated code so as to get data only. Latter shows PP(p) not strictly increasing.  Able now to construct second sequence I mentioned to you.

Agree your latest derivation of asymptotic value though since it’s so close to original Li(p)^2/2*p (as p->00), might as well use latter (seemed to fit well in the plot). 

Will enter sequence in oeis when space available and let you know.

Might take a while...

 

David.

@Carl Love 

Hi Carl, thanks for that.

Sadly I have had no education in coding in any language so I struggle with it, trying to learn as I go along. Despite this I have had some minor successes. However, for me your code is a highly sophisticated piece of work, employing devices and structures which I have not seen before. I asked Mapleprimes for help with this because i could not do it myself and wanted to see what a proper solution would look like. What I hoped for was a code to calculate the data and so was surprised to see that your work went much further than that; the data,the plot plus your intuitions; all good stuff. I  have already tried to separate the data calculation from the plot, and will keep trying. What seems trivial for you is not so for me. If you know of a good book on Maple please let me know. I am very eager to learn this.

Cheers

David.

@Carl Love 

Hi, Thanks for your posts. No good today, travel again, just time for a few remarks:

Li function indeed better behaved than pi; continuous and différentiable, just that singularity to deal with. Have seen two versions, with different lower limits of integral; one with 0 the other with 2. Don’t suppose it makes much difference as

x—>00 but as matter of interest which are you using?

Despite the change from p/2 to 2*p I got correct data; strange. 

Might be better for oeis if code for data can be decoupled from code for plot. Latter could then be a link (they have a separate section for links in any submission). 

Thought: Consider triple (a,b,c) where a,b,c are all primes <prime p and such that a*b*c==1mod p. Presumably your code could be adapted to find such triples for arbitrary p, just as it did for the pairs (a,b) ? 

eg: 2*3*5==1mod 29.

This might lead to an asymptotic formula, residues etc, similar to the case for prime pairs. Likewise, generalisation to r-tupples: 

(a,b,c,d.....r) might be worth looking at. Does this sound interesting?

Dashing now catch up later

Cheers

David. 

 

@Carl Love 

Thanks, I got your code to run but no plot yet. What I have is a long list of Matrix output in the form [p, PP], from p=2 up to p=67523. There is an error message saying “unexpected options: [n=2.*Matrix*( then the data.

There were a couple of things in the code: first in Asy the denominator was 2/p so I changed it to 2*p in line with your earlier remarks. Then at the end of the CountPairs proc there was an isolated n after od; which I did not touch; does it mean something?

I did not yet try your last suggestion for extracting the data directly, is there a special place in the code where I should enter CountPairs(nextprime(10000))?

I need the raw data so as to enter it in oeis, which does not accept a sequence without data. I will of course attribute the code, and no doubt somebody else will add another code to verify the data (probably Pari). The plot could come in a separate link, once I have it, and that will be attributed as well.

You have been so helpful, and spot on  with your intuition; very much appreciated. 

 

Cheers

David.

@Carl Love 

Carl, thanks for the retrofit code.

Initially (before proceeding to the plot), what I would like to see is the data, ie number of prime pairs (a,b) for each prime p, such that a,b<p and a*b==1 mod p, calculated for all primes p <= some arbitrary number N.

Can I use the code for that purpose or would it need to be modified? 

Thanks

David.

 

@Carl Love 

Firstly I think this subject has not been much studied since if it had there would be a trace in the oeis, and there isn’t. 

Two sequences come to mind. The first is what you call PP(p), the number of prime pair inverses in Zp. The first few terms are: 0,0,1,1,0,1,1,2,1,0,1,2,2,2,2,2,2,3,4,3,2,3

and so on. 

The second is the sequence a(n) = smallest prime p to have n prime inverse paires in Zp. The initial terms (if I’m not mistaken, are: 2,5,19,61,67,113,191...

neither of these appears in oeis so that to me says this is an open subject. Before my away trip I entered the second one as a draft in oeis but have not been able to finish it because of WiFi issues. I have no space to enter the  PP(p) sequence because there is a big backlog, but I will do that as soon as a space comes up. Meantime the main intuitions have been yours since you have made a code and studied some of the data. Personally I was not entirely convinced by the independence idea, though somehow it did seem to have a plausible feel to it. Therefore I was ready to accept it as a working proposition, and in the absence of any other better idea to replace it with. Your intuition, achieved in a few moments of thought seems to have been quite a jump ahead and I for one have not yet seen how you proceeded from there to complete the proof. I also did not anticipate the Li function, my first thought in that direction would have been the prime counting function pi, which I know to be similar to Li. In any case your data and the bounds are quite convincing, so maybe you are right, but I agree the proof is looking tricky, and might only appear possible if, as you already suggest it can be shown to be true asymptotically, as p >>>oo. 

Some other aspects : For p=29, Zp contains no prime inverse pairs and appears to be the largest prime with this property (2,3,11) also have it. I have only checked (manual Maple) out to p=191 but how to be sure there is not some weird prime way out there which has the same property? As p gets bigger the likelihood of this gets smaller and smaller of course, but it’s still a valid question. Interesting finite sequences are rare, and this might be one!

Similarly, for p=5, we find that every prime in Zp has a prime inverse. Again as p grows, the likelihood that another p crops up with this property reduces. And this is born out by the limited data I have produced. But being certain about it is another matter. 

I will try and use your code tomorrow if time permits, and see what the extended data looks like. From that I will be able to extend the second sequence I mentioned. 

Thanks again for your input here, I have found your intuitions, backed with data to be very credible. Maybe you (or I) could address such questions to the Seqfan group associated with the Oeis? I think they would be interested in this subject. In any case when these two sequences are approved, your input to edit them by addition of your findings would I suggest be a reasonable way to go. Ok I stop there, it’s been a long haul today and I have to sleep now.

regards

David

@Carl Love 

Hi Carl,

Thanks for your very interesting observations and results. I have not been able to reply because of travelling in an area where there was little or no WiFi. Am just now arriving back in UK and will reply tomorrow.

My version of Maple is 2017 so don’t know if can use your code.

my email is djsycamore@yahoo.co.uk

cheers

David 

@Carl Love 

Thank you for that. I tried :

“PrimeCounting (31);”

and got “PrimeCounting(31)”

So this does not work for me, although my version of Maple is just a year old.

Am I doing something wrong here?

Then I tried “numtheory[pi](31);”

and Maple replied “11”

please advise how I could get the PrimeCounting function to work

regards

David.

@Carl Love 

Thanks for this advice, I will try it when the current run (using ithprime) is finished; it’s been going for three days now...

Do you think that using the nextprime function as you have described, should be faster than ithprime? From the coding you suggested I can’t see why there should be much of a difference, but you may know better...

Cheers

David. 

@tomleslie 

Thanks, I thought that would be how it might work;  a limited library of known primes, and beyond that uncertainty...

Would you mind to you clarify the “argument” (eg 25) referred to in your message?

David.

@nm 

Thanks, very interesting. I passed your remark on to Maple technical support and asked if the Maple list of known primes would be extended in a forthcoming update. 

Regards

David

@Carl Love 

Thanks, I had thought of that but was not sure how to do it. At the moment my code has the following basic structure :

N:=10^9

for n from 10^6 to N do

P:=ithprime(n);

blah blah blah;

end do

 

It goes very slowly, for the reasons explained so I would like to try it with the nextprime function just In case it’s faster. Is there a way to organise the index for this, assuming I select a specific start prime p and work up from there to an arbitrary (composite) limit?

My code needs to check each prime in ascending order.....

David.

@David Sycamore 

 

Hi Tom,

Thanks for your “Toy” suggestion. I got it to work in my code by using:

If x in xlist then A:=f(x), etc..

Maybe for you it’s a trivial thing but for me a big step in learning, so much obliged to you.

David. 

 

 

@tomleslie 

 

Hi Tom,

Thanks for this suggestion, it looks like the kind of thing I need to make my code work. I will give it a go :-)

David.

@Carl Love 

ps: The code I am working on is to find term a(20) in oeis sequence A293652 (a prime >14*10^9).

David

1 2 3 4 5 6 Page 5 of 6