OFFSET
0,1
COMMENTS
Definition: prime^0(q) = q; prime^r(q) = prime(prime^(r-1)(q)); r >= 1. P_n(q) can be thought of as a "primeth polynomial" of degree n, the sum of terms of ascending orders of primeness, such that the result is always an odd (possibly prime) number. Because of the rapid growth of the primeth function only the first few terms of this sequence have been found so far.
Note: If q exists, a(n) > 2 for n >= 1 because P_n(2) is composite.
LINKS
N. Fernandez, An order of primeness, F(p), 1999.
EXAMPLE
For q = 2,3 P_1(q) = 6,9 respectively, but P_1(5) = 11 + 5 + 1 = 17; so a(1)=5.
For q = 2, P_2(2) = 5 + 3 + 2 = 10, but P_2(3) = 11 + 5 + 3 = 19, so a(2) = 3.
MAPLE
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: # W. Edwin Clark, Aug 20 2018
PROG
(Python)
from __future__ import division
from sympy import isprime, prime, nextprime
A318189_list, nmax, plist = [], 8, [[2]]
for n in range(nmax):
r = (1-(-1)**n)//2
for x in plist:
if isprime(sum(x) + r):
A318189_list.append(x[0])
break
else:
p = plist[-1][0]
while True:
p = nextprime(p)
x = [p]
for i in range(n):
x.append(prime(x[-1]))
plist.append(x)
if isprime(sum(x)+r):
A318189_list.append(x[0])
break
if n < nmax-1:
for x in plist:
x.append(prime(x[-1])) # Chai Wah Wu, Aug 20 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
David James Sycamore, Aug 19 2018
EXTENSIONS
Terms a(0) and a(10) to a(14) were found by Edwin Clark, Hans Havermann, and Chai Wah Wu (Sequence Fans Mailing List, Aug 22 2018).
STATUS
approved
