|
|
A180481
|
|
The smallest prime q > p = prime(n) such that p*(q-p)+q, p*(q-p)-q, q*(q-p)+p and q*(q-p)-p are simultaneously prime, or 0 if no such q exists.
|
|
2
|
|
|
11, 23, 11, 67, 3119, 19, 941, 739, 29, 41, 79, 127, 5507, 1399, 191, 56873, 1193, 16657, 49411, 30059, 10453, 373, 719, 18773, 12277, 1031, 1489, 131, 823, 1283, 14251, 317, 10631, 313, 191, 16987, 70381, 229, 8447, 3539, 1019, 3499, 2777, 301579, 587, 241, 6229, 229, 11657, 571, 2969, 701, 1627, 20327, 467, 2069, 863
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
It is conjectured that a(n) > 0 for all n, and for infinitely many terms, a(n) = prime(n+1).
a(n) = prime(n+1) for n = 9, 100, 508, 627, 752, 835, 889, ... (that is, for p = 23, 541, 3631, 4643, 5711, 6421, 6911, ...) - Derek Orr, Aug 25 2014
We have a(n) - prime(n) == 0 (mod 6) for all n > 2. Indeed, suppose p = 6k + 1, then q - p = 6n + 2 would imply that q is divisible by 3, and q - p = 6n + 4 would imply that p*(q-p)+q is divisible by 3. A similar reasoning applies for p = 6k - 1: here q - p = 6n + 4 entails 3|q, and q - p = 6n + 2 yields 3 | p*(q-p)-q.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
sp[p_]:=Module[{q=NextPrime[p]}, While[AnyTrue[{p(q-p)+q, p(q-p)-q, q(q-p)+p, q(q-p)-p}, CompositeQ], q=NextPrime[q]]; q]; Join[{11, 23}, Table[sp[p], {p, Prime[Range[3, 60]]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 23 2021 *)
|
|
PROG
|
(PARI) A180481(p)={ forprime( q=1+p=prime(p), default(primelimit), isprime(p*(q-p)+q)|next; isprime(p*(q-p)-q)|next; isprime(q*(q-p)+p)|next; isprime(q*(q-p)-p)|next; return(q)) }
(Python)
from sympy import prime, isprime
....p = prime(n)
....n += 1
....q = prime(n)
....while q < 10**14: # note: search limit
........if isprime(p*(q-p)+q) and isprime(p*(q-p)-q) and isprime(q*(q-p)+p) and isprime(q*(q-p)-p):
............return(q)
........n += 1
........q = prime(n)
....return(0) # limit in search for q was reached. A180481(n) may be > 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|