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.

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.

Terms

    a(0) =2a(1) =3a(2) =5a(3) =4a(4) =6a(5) =8a(6) =9a(7) =7a(8) =10a(9) =12a(10) =14a(11) =15a(12) =16a(13) =18a(14) =20a(15) =11a(16) =21a(17) =13a(18) =22a(19) =24a(20) =25a(21) =26a(22) =27a(23) =28a(24) =30a(25) =32a(26) =33a(27) =34a(28) =35a(29) =36

External references