OFFSET
1,2
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..1000
PROG
(PARI) extend_first_row( a=[], u=[] )={ u || for( i=1, #a, u=setunion(u, Set(a[i]));
forstep( j=i-1, 1, -1, u=setunion(u, Set(a[j]+=a[j+1]))));
for( t=1, 9e9, isprime(t) && next; setsearch(u, t) && next; my(tt=t);
forstep( j=#a, 1, -1, setsearch(u, tt += a[j]) && next(2); isprime(tt) && next(2)); return(t)) }
a=[]; for(i=1, 100, print(a=concat(a, extend_first_row(a))))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 28 2011
STATUS
approved