OFFSET
1,2
COMMENTS
Every term is 1 less than a prime.
EXAMPLE
3 could be represented by 1+2 or 0+3, but 1,2 is lexicographically later than 0,3; so the sequence starts with 1,2.
Once 4 is added to sequence for 1+4 = 5, 7 = 1+2+4 is already a sum. So the next thing we need to add is 10 for 1+10=11.
PROG
(PARI) issum(v, k, tot, n)={if(n>=tot, n==tot,
n==0||(n>=v[k]&&issum(v, k-1, tot-v[k], n-v[k]))||issum(v, k-1, tot-v[k], n))}
al(n) = {local(r=vector(n), k=1, p=3, tot=1); r[1]=1;
while(k<n, if(!issum(r, k, tot, p), tot+=r[k++]=p-1); p=nextprime(p+1));
r}
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, May 09 2014
STATUS
approved