a(n+1) occurs not earlier as a neighbor of terms = a(n): either it is the greatest number < a(n) or, if no such number exists, the smallest number > a(n); a(1) = 1.
A100035
a(n+1) occurs not earlier as a neighbor of terms = a(n): either it is the greatest number < a(n) or, if no such number exists, the smallest number > a(n); a(1) = 1.
Terms
- a(0) =1a(1) =2a(2) =3a(3) =1a(4) =4a(5) =3a(6) =5a(7) =4a(8) =2a(9) =5a(10) =1a(11) =6a(12) =5a(13) =7a(14) =6a(15) =4a(16) =7a(17) =3a(18) =6a(19) =2a(20) =7a(21) =1a(22) =8a(23) =7a(24) =9a(25) =8a(26) =6a(27) =9a(28) =5a(29) =8
External references
- oeis: A100035