a(1)=1. Given a(1),...,a(n-1), to find a(n), let S = {a(1), ..., a(n-1), |a(2)-a(1)|, ..., |a(n-1)-a(n-2)|}. Let d be the smallest positive integer not in S. Then a(n) is the smallest one of a(n-1)-d and a(n-1)+d which is a positive integer not in S union {d}.
A095115
a(1)=1. Given a(1),...,a(n-1), to find a(n), let S = {a(1), ..., a(n-1), |a(2)-a(1)|, ..., |a(n-1)-a(n-2)|}. Let d be the smallest positive integer not in S. Then a(n) is the smallest one of a(n-1)-d and a(n-1)+d which is a positive integer not in S union {d}.
Terms
- a(0) =1a(1) =3a(2) =7a(3) =12a(4) =18a(5) =10a(6) =19a(7) =30a(8) =17a(9) =31a(10) =16a(11) =36a(12) =57a(13) =35a(14) =58a(15) =34a(16) =59a(17) =33a(18) =60a(19) =32a(20) =61a(21) =98a(22) =136a(23) =97a(24) =137a(25) =96a(26) =54
External references
- oeis: A095115