a(1) = 1; a(n) is the smallest positive integer not occurring earlier in the sequence if n is a composite. a(n) = a(n-1)th smallest positive integer among those not occurring earlier in the sequence if n is prime.

A103865

a(1) = 1; a(n) is the smallest positive integer not occurring earlier in the sequence if n is a composite. a(n) = a(n-1)th smallest positive integer among those not occurring earlier in the sequence if n is prime.

Terms

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

External references