OFFSET
1,2
COMMENTS
A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for multiples of 3. In contrast to that sequence we only have two "bands" or lines here. L. Blomberg has studies several properties of this sequence (private communication).
LINKS
PROG
(PARI) {a(n, show=1, a=[1], L=0/*up to L all numbers are used*/, U=[]/*numbers > L already used*/)=while(#a<n, show&&print1(a[#a]", "); /*if the last term is larger than L+1, add it to U*/ if(a[#a]>L+1, U=setunion(U, [a[#a]]), /*else increase L and remove terms from U if possible*/ L++; while(#U&&U[1]<=L+1, U=U[^1]; L++)); a=concat(a, if(a[#a]%3, L+1, a[#a]+a[#a-1]))); a}
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved