# [seqfan] Re: Is the definition of this sequence correct?

Mon Jul 4 05:21:03 CEST 2022

``` Hi Allan,
1, 2, 4, 6, 8, 3, 10, 12, 5, 14, 16, 7, 18, 20, 22, 9, 24, 26, 11, 28, 30, 32, 13

The distance between 1 and 2 is 1 (=1)The distance between 2 and 3 is 4 (>2)The distance between 3 and 4 is 3 (=3)The distance between 4 and 5 is 6 (>4)The distance between 5 and 6 is 5 (=5)The distance between 6 and 7 is 8 (>6)The distance between a(n) and a(n)+1 is always >= a(n). If a(n) is odd, the distance equals to a(n).

Best,
Ali

On Monday, July 4, 2022 at 02:43:38 AM GMT+1, Allan Wechsler <acwacw at gmail.com> wrote:

I think Tom Duff's definition yields the powers of two. I still don't know
what Ali Sada is intending. Ali, could you take the sequence a few steps
further to give us a better chance of figuring out what you mean?

On Sun, Jul 3, 2022 at 5:06 PM Tom Duff <eigenvectors at gmail.com> wrote:

> No, sorry, my definition is bogus. The sequence is more complicated than I
> made it out to be.
>
> On Sun, Jul 3, 2022 at 15:01 Tom Duff <eigenvectors at gmail.com> wrote:
>
> > I think this should read:
> > a(1)=1; a(n+1) is the smallest positive integer, distinct from all a(m),
> > m<=n, with |a(n+1)-a(n)|>=a(n).
> >
> > Sequences, not their entries, are “lexicographically earliest”. The way a
> > sequence gets to be lexicographically earliest is by picking the smallest
> > eligible entry at each step. “Distance … in both directions” is best
> > expressed by explicitly saying that it’s the absolute difference.
> > All that said, I’m surprised that this sequence is not already in the
> > OEIS. Compute a bunch of terms (it’s easy, you shouldn’t need help) and
> > search for it. If it’s not there, add it.
> >
> > On Sun, Jul 3, 2022 at 04:18 Ali Sada via SeqFan <seqfan at list.seqfan.eu>
> > wrote:
> >
> >> Hi everyone,
> >>
> >> Please check this definition
> >>
> >> a(1) =1; a(n) is the lexicographically earliest positive integer such
> >> that the distance between a(n) and a(n)+1 is >= a(n) in both directions.
> >> (The distance between a(n) and a(m) is |n-m|)
> >>
> >> a(1) = 1
> >> a(2) = 2
> >> Now, a(3) cannot be 3, so a(3) = 4.
> >> a(4) cannot be 3 nor 5, so a(4) = 6.
> >> a(5) cannot be 3 nor 5 nor 7, so a(5) = 8.
> >> Now, we can use 3 for a(6) (the distance with 4 is 3).
> >> And so on.
> >>
> >> I would appreciate your help with the correct definition and terms.
> >>
> >> Best,
> >>
> >> Ali
> >>
> >> --
> >> Seqfan Mailing list - http://list.seqfan.eu/
> >>
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>

--
Seqfan Mailing list - http://list.seqfan.eu/

```