a(1)=1, a(2)=2. a(n) = the smallest positive integer that does not occur earlier in the sequence and is coprime to the second-largest term occurring earlier in the sequence.

A123882

a(1)=1, a(2)=2. a(n) = the smallest positive integer that does not occur earlier in the sequence and is coprime to the second-largest term occurring earlier in the sequence.

Terms

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

External references