

A163847


Starting from a(1)=13, a(n+1) is the smallest prime > a(n) such that 2*a(n)  a(n+1) is also prime.


6



13, 19, 31, 43, 67, 73, 79, 97, 127, 151, 163, 199, 241, 271, 313, 349, 367, 397, 421, 433, 457, 541, 619, 631, 643, 673, 727, 811, 853, 877, 967, 997, 1087, 1123, 1129, 1171, 1213, 1297, 1303, 1327, 1423, 1447, 1471, 1483, 1543, 1597, 1627, 1657, 1693
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

This is: select the prime a(n+1) = a(n)+d such that at a(n)d is another prime at the same distance to but at the opposite side of a(n).
It seems all these primes are in the class 1 (mod 6), that is, in A002476 as opposed to A007528.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..10000
ZhiWei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.


EXAMPLE

For a(2), the first candidate is the prime 17=13+4, which is not selected because 134=9 is not prime.
The next larger candidate is the prime 13+6=19, which is selected as a(2) because 136=7 is also prime.
For a(3) the first candidate is the prime 19+4=23, which is not selected because 194=15 is not prime.
The next candidate is the prime 19+10=29, which is not selected because the 1910=9 is not prime.
The next larger candidate, the prime 19+12=31 is selected as a(3), because 1912=7 is prime.


MAPLE

A163847 := proc(n) option remember; if n = 1 then 13; else for a from procname(n1)+2 by 2 do if isprime(a) and isprime( 2*procname(n1)a) then RETURN(a) ; fi; od: fi; end:
seq(A163847(n), n=1..80) ; # R. J. Mathar, Aug 29 2009


MATHEMATICA

DeltaPrimePrevNext[n_]:=Module[{d, k1, k2}, k1=n1; k2=n+1; While[ !PrimeQ[k1]  !PrimeQ[k2], k2++; k1 ]; d=k2n]; lst13={}; p=13; Do[If[pDeltaPrimePrevNext[p]>1, AppendTo[lst13, p]; p=p+DeltaPrimePrevNext[p]], {n, 7!}]; lst13
(* Second program: *)
k=6
n=1
Do[If[m==6, Print[n, " ", 13]]; If[m==k, n=n+1; Do[If[PrimeQ[2Prime[m]Prime[j]]==True, k=j; Print[n, " ", Prime[j]]; Goto[aa]], {j, m+1, PrimePi[2Prime[m]]}]]; Label[aa]; Continue, {m, 6, 1000}] (* ZhiWei Sun, Feb 25 2013 *)


PROG

(PARI) first(n) = { my(res = vector(n)); res[1] = 13; for(x=2, n, forprime(p=res[x1]+1, , if(ispseudoprime(2*res[x1]  p), res[x]=p; break()))); res; } \\ Iain Fox, Nov 18 2017


CROSSREFS

Cf. A163846, A222532.
Sequence in context: A182365 A069324 A040047 * A051644 A101408 A023252
Adjacent sequences: A163844 A163845 A163846 * A163848 A163849 A163850


KEYWORD

nonn


AUTHOR

Vladimir Joseph Stephan Orlovsky, Aug 05 2009


EXTENSIONS

Definition and comment rephrased by R. J. Mathar, Aug 29 2009


STATUS

approved



