I'm looking for a sequence of positive integers with the property that, where $s(i)$ denotes the $i$th term, $s(i)<s(i+1)$ or $s(i+1)<s(i+2)$ but not both. The sequence also has the property that $s(i)=s(j)$ iff $i=j$. An OEIS number would be ideal.
2026-05-16 18:26:39.1778955999
Help Find A Sequence With The Property s(i) < s(i+1) XOR s(i+1) < s(i+2)
24 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are many such sequences; you merely have that it alternates increasing a decreasing and is injective. The example $$s(n)=n-(-1)^n$$ which starts $2,1,4,3,6,5,\ldots$ satisfies this.