[seqfan] Re: Primorial Polynomial ?

rgwv at rgwv.com rgwv at rgwv.com
Wed Aug 22 06:25:22 CEST 2018


a(12)=127

-----Original Message-----
From: SeqFan <seqfan-bounces at list.seqfan.eu> On Behalf Of rgwv at rgwv.com
Sent: Tuesday, 21 August, 2018 11:43 PM
To: 'Sequence Fanatics Discussion list' <seqfan at list.seqfan.eu>
Subject: [seqfan] Re: Primorial Polynomial ?

f[n_] := Block[{p = 2}, While[! PrimeQ[Plus @@ NestList[Prime, p, n] + (1 - (-1)^n)/2], p = NextPrime at p]; p]; Array[f, 11] {5, 3, 13, 5, 3, 29, 3, 13, 13, 3, 5}

-----Original Message-----
From: SeqFan <seqfan-bounces at list.seqfan.eu> On Behalf Of W. Edwin Clark
Sent: Sunday, 19 August, 2018 8:27 PM
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Cc: David Sycamore <djsycamore at yahoo.co.uk>
Subject: [seqfan] Re: Primorial Polynomial ?

David,

Here's Maple code to compute the sequence.
 Not efficiently written, but it works up to n = 8. It slows down at n = 9.  I quit waiting. It agrees with you as far as it went. But the problem seems to be that computing
prime^n(q) =(ithprime@@n)(q) is not trivial for large q.

P:=proc(n,q)
add((ithprime@@j)(q),j=0..n)+(1-(-1)^n)/2;
end:
a:=proc(n)
local q,i;
for i from 1 do
q:=ithprime(i):
if isprime(P(n,q)) then return q; fi;
od:
end:
lprint(seq(a(n),n=1..8));
5, 3, 13, 5, 3, 29, 3, 13


For example to compute a(9) we run into the following:
q:=ithprime(9);
for j from 1 to 7 do lprint(j,(ithprime@@j)(q)); od;
                            q := 23
1, 83
2, 431
3, 3001
4, 27457
5, 318211
6, 4535189
7, 77557187

To compute ithprime(77557187) one needs a large list of primes.

Edwin

On Sat, Aug 18, 2018 at 10:42 AM, David Sycamore via SeqFan < seqfan at list.seqfan.eu> wrote:

> For any integer n>=1 and any prime q, define:
>
> P_n = prime^n(q) + prime^(n-1)(q) +
> ...... + prime(q) + q + (1-(-1)^n)/2.
>
> Where prime^2(q) = prime(prime(q)), etc.
>
> Then for any n>=1, and any q>2, P_n is always odd, and can sometimes 
> be prime.
>
> Examples:
> P^1(5) =  11 + 5 + 1 = 17
> P^2(3) = 11 + 5+ 3= 19
> P^3(7) = 277 + 59 + 17 + 7 +1 = 361
>
> Let a(n) be the smallest prime q such that P_n(q) is prime.
>
> (Note that a(n)>2 for all n because P_n(2) is always composite).
>
> According to my calculation, the first few terms are: 5,3,13,5,3,29,3
>
> Would anyone be interested to find more terms?  (a code would be nice).
> Any comments welcome.
> Cheers
> David.
>
>
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>

--
Seqfan Mailing list - http://list.seqfan.eu/


--
Seqfan Mailing list - http://list.seqfan.eu/




More information about the SeqFan mailing list