OFFSET
1,2
COMMENTS
No sum of a continuous subsequence is ever prime. Is every integer used? Can an odd number ever be surrounded by two even numbers (and similarly for even numbers)?
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4)=7 because 7 is the smallest unused number such that 1+3+5+x, 3+5+x and 5+x are all composite
PROG
(PARI) checkprime(a, b)=local(fl); fl=0; for (i=1, b-1, if (isprime(a+s[i]), fl=1; break)); if (fl==0, for (j=1, b-1, if (a==p[j], fl=1; break))); fl
p=vector(300); p[1]=1; pc=2; while (pc<300, x=1; s=vector(300); for (i=1, pc-1, s[i]=sum(k=i, pc-1, p[k])); i=1; while (checkprime(x, pc), x++); p[pc]=x; pc++); p
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jun 06 2003
STATUS
approved