The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

A073884

a(1) =2. Let S(k) = sum of k terms. If S(n) is prime then a(n+1) is the smallest prime not included earlier else a(n+1) is the smallest composite number not included earlier.