OFFSET
1,1
EXAMPLE
a(6)=27 because it is the smallest number producing 3 primes in the sums with all previous terms: a(1)+27 = 2+27 = 29, a(3)+27 = 4+27 = 31, a(5)+27 = 10+27 = 37;
a(7)=34: a(2)+34 = 3+34 = 37, a(4)+34 = 9+34 = 43, a(6)+34 = 27+34 = 61;
a(8)=69 because it is the smallest number producing 4 primes in the sums with all previous terms: a(1)+69 = 2+69 = 71, a(3)+69 = 4+69 = 73, a(5)+69 = 10+69 = 79, a(7)+69 = 34+69 = 103.
PROG
(PARI)
PT(x)={print1(x, ", "); write("b291163.txt", n++, " ", x)};
n=0;
ae=vector(11);
ao=vector(11);
ae[1]=2; PT(ae[1]);
ao[1]=3; PT(ao[1]);
for (m=1, 10, \
start=(ao[m]+1)/2; \
for (kh=start, 100*start, k=kh+kh; \
for(jj=1, m, j=m-jj+1; if(!isprime(k+ao[j]), next(2))); \
ae[m+1]=k; PT(k); break(1)); \
start=ae[m+1]/2; \
for (kh=start, 100*start, k=kh+kh+1; \
for(jj=1, m+1, j=m-jj+2; if(!isprime(k+ae[j]), next(2))); \
ao[m+1]=k; PT(k); break(1)))
\\ Hugo Pfoertner, Oct 10 2017
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Rainer Rosenthal and Hugo Pfoertner, Oct 07 2017
STATUS
approved