a(1)=1; a(n+1) is either a(n)-n or a(n)+n, where we choose the smallest positive integer that's not among the values a(1), ..., a(n).

A078943

a(1)=1; a(n+1) is either a(n)-n or a(n)+n, where we choose the smallest positive integer that's not among the values a(1), ..., a(n).

Terms

    a(0) =1a(1) =2a(2) =4a(3) =7a(4) =3a(5) =8a(6) =14a(7) =21a(8) =13a(9) =22a(10) =12a(11) =23a(12) =11a(13) =24a(14) =10a(15) =25a(16) =9a(17) =26a(18) =44a(19) =63a(20) =43a(21) =64a(22) =42a(23) =19

External references