OFFSET
1,1
COMMENTS
Corresponding values of 2*a(n-1)+a(n): 7, 11, 17, 31, 53, 61, 83, 127, 167, 193, 239, 307, 353, 421, 557, 673, 683, 691, 743, 907, 1103, ...
a(n) == (-1)^n (mod 3) for n <> 2. - Robert Israel, Sep 02 2016
Conjecture: starting with any other prime, the sequence will eventually merge with this one. - Zak Seidov, Aug 06 2023.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
A[1]:= 2:
for n from 2 to 100 do
p:= nextprime(A[n-1]);
while not isprime(2*A[n-1]+p) do p:= nextprime(p) od:
A[n]:= p
od:
seq(A[i], i=1..100); # Robert Israel, Sep 02 2016
MATHEMATICA
s={2, 3}; a=3; Do[k=2; While[!PrimeQ[2a+a+k]||!PrimeQ[a+k], k=2+k]; a=a+k; AppendTo[s, a], {50}]; s
PROG
(PARI) terms(n) = my(x=2, i=0); while(1, if(n==0, break({2}), print1(x, ", "); if(n==1, break({2}), forprime(p=x+1, , if(i==n-1, break({2})); if(ispseudoprime(2*x+p), print1(p, ", "); x=p; i++)))))
/* The following function call prints the initial 50 terms */
terms(50) \\ Felix Fröhlich, Aug 22 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 22 2016
STATUS
approved