David Sycamore

95 Reputation

4 Badges

6 years, 124 days

MaplePrimes Activity


These are questions asked by David Sycamore

Requesting a procedure to calculate primes p for which there exists a prime q <= p such that pi(p)=q-pi(q), where pi is the prime counting function. If possible options to select output as p, or as (p,q).

p list starts:2,13,17,29,31,43.....

q list starts: 2,11,13,17,19,23...

Thanks in advance,

David.

A083758 is the lexicographically earliest infinite sequence of distinct primes such that the concatenation of the first n terms is prime for all n>=1. It starts: 2,3,11,7,41,31..

The first ~ 1000 terms are already known from other codes (Mathematica, PARI), and it so far primes 13,47,61... have not yet been seen in the data. Progress beyond this point is difficult because of the rapid growth of the concatenations and uncertainties about the primality of such large numbers.

 

I would like to know if it could be possible to have a Maple code (operable in the 2017 version) which could produce terms significantly the first 1000 terms, and including a mechanism for flagging (at the end of any given run) the smallest prime not yet seen in the sequence?

 

Best regards

David. 

General question: I write integer sequences in Maple (often with your help).
 

Once I have a working code, able to output any chosen number of terms, is there a standard way to modify the code so as to get a graph (eg linear linear or linear log, etc...)? 
 

Here is an example : 

 

A[1]:=1: P:=0; Q:=0; # P counts primes, Q non primes.

for n from 1 to 100 do

if not isprime(A[n]) then

Q:=Q+1;

A[n+1]:=Q;

else P:=P+1;

A[n+1]:=P;

fi

od:

[seq(A[i], I=1..1000)];

1,1,2,1,3,2,3,4,4,5,5,6,67,7,8,8,9,10,11,9....

The code gets the right data and I would like to make graphs of it. Is it possible to modify the code for this?

Thanks in advance

David.

I would appreciate to know how to compute the following in Maple:

Sequence of distinct primes (starting term is 2) such that each subsequent term is the smallest prime not yet seen whose leading digits and the sum of the digits of the previous term are the same. It starts: 2,23,5,53,83,11,29..
 

it should be interesting to see which primes with first digit 3 appear (given that 3 is not a term). I would also like to be able to change the first term (eg to 3).

Best regards

David.

I would appreciate seeing how Maple handles concatenation, digital sums and selection of related least terms. Here are two examples of problems currently of interest:

1. Construct the lexicographically earliest sequence of distinct positive integers such that the sum of the digits of the first n terms is coprime to their concatenation; first term is 1:

1,3,7,2,4,5,9,6,13,8,19,11....

(I already have many terms for this, computed by a  Mathematica code, but would like to see it done in Maple).

2. Lexicographically earliest sequence of distinct positive integers such that the n-th term divides the concatenation of the first n terms; first term is 1:

1,2,3,5,10,4,8,6,11,20,13,7,9,12,15,18,14,25,30.....

(these terms found one by one, using Maple in manual mode, no code).

Thanks in advance for any assistance with this 

Regards

David.

 

 

1 2 3 4 5 Page 2 of 5