[seqfan] Re: Can we write this definition in a better way?

Tw Mike mt.kongtong at gmail.com
Wed Oct 2 13:51:22 CEST 2019


Odd indexes elements:
a[4 * 4^ n + 1] = 4 * n + 1

5, 2, 4, 3
9, 2, 4, 3, 8, 7
13, 2, 4, 3, 8, 7, 12, 11
...

Even indexes elements:
a[4 * (n^2 + 4 * n + 5)] = 4 * n + 8
12, 5, 4, 9
16, 5, 4, 9, 8, 13
20, 5, 4, 9, 8, 13, 12, 17
...

Hope this helps

Mike,

2019-09-30 9:59 GMT+08:00, Ali Sada via SeqFan <seqfan at list.seqfan.eu>:
>  Dear Dr.  Hasler,
> Thank you very much! This table might look trivial to you, but it definitely
> looks beautiful to me. I would really appreciate it if you could add it to
> the sequence when it gets published.
> Best,
> Ali
>
>     On Sunday, September 29, 2019, 6:38:59 PM EDT, M. F. Hasler
> <seqfan at hasler.fr> wrote:
>
>  Dear Ali & SeqFans:I also found this sequence interesting, but I think
> there is a pattern making the sequence somewhat trivial to compute.If we
> consider the sequence as a table of rows of length = max(2n-1,1), n=0,1...
> then, starting with row n=5 : (i.e., starting with a(18)=1)- all rows start
> with 1, and there are no other 1's,- the even rows are of the form
>  (1, 2n-4, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, ..., 2,3,
> 2n-3)  where the terms between (1,2n-4) and (2,3, 2n-3) are [ (2k+1, 2k),
> k=1..2n-3 ]- the odd rows are of the form  (1, 2, 2n-2, 4, 5, 3, 4, 8, 9, 7,
> 8, 12, 13, 11, 12, 16, 17, 15, 16,..., 3, 2n-4)  where the terms between
> 2n-2 and (3, 2n-4) follow the simple pattern [ (4k, 4k+1, 4k-1, 4k),
> k=1..2n-6 ].
> A327759 = [1, /* row n=0 */
> 2,  /* row n=1, from here on, length=2n-1 */2, 3, 1,  /* n=2 */2, 1, 4, 5,
> 1,  /* n=3 */2, 4, 1, 5, 1, 2, 5, /* n=4 */1, 2, 8, 4, 5, 3, 4, 3, 6, /* n=5
> */1, 8, 3, 2, 5, 4, 7, 6, 2, 3, 9,  /* n=6 */1, 2, 12, 4, 5, 3, 4, 8, 9, 7,
> 8, 3, 10, /* n=7*/1, 12, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 2, 3, 13, /* n=8
> */
> 1, 2, 16, 4, 5, 3, 4, 8, 9, 7, 8, 12, 13, 11, 12, 3, 14,  /* n=9 */1, 16, 3,
> 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 2, 3, 17,  /* n=10 */1, 2, 20,
> 4, 5, 3, 4, 8, 9, 7, 8, 12, 13, 11, 12, 16, 17, 15, 16, 3, 18,  /* n=11 */1,
> 20, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 2, 3,
> 21,  /* n=12 */1, 2, 24, 4, 5, 3, 4, 8, 9, 7, 8, 12, 13, 11, 12, 16, 17, 15,
> 16, 20, 21, 19, 20, 3, 22,  /* n=13 */1, 24, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10,
> 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 2, 3, 25,   /* n=14 */1, 2,
> 28, 4, 5, 3, 4, 8, 9, 7, 8, 12, 13, 11, 12, 16, 17, 15, 16, 20, 21, 19, 20,
> 24, 25, 23, 24, 3, 26,   /* n=15 */1, 28, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10,
> 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 2, 3, 29,
> /* n=16 */1, 2, 32, 4, 5, 3, 4, 8, 9, 7, 8, 12, 13, 11, 12, 16, 17, 15, 16,
> 20, 21, 19, 20, 24, 25, 23, 24, 28, 29, 27, 28, 3, 30,   /* n=17 */1, 32, 3,
> 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22,
> 25, 24, 27, 26, 29, 28, 31, 30, 2, 3, 33,   /* n=18 */1, 2, 36, 4, 5, 3, 4,
> 8, 9, 7, 8, 12, 13, 11, 12, 16, 17, 15, 16, 20, 21, 19, 20, 24, 25, 23, 24,
> 28, 29, 27, 28, 32, 33, 31, 32, 3, 34,   /* n=19 */...]This may be a bit
> tedious but straightforward to prove.
>
> I also suggest that the simpler triangle mentioned by Chris,with rows of
> length 2n, going (1, 3,3, 5,5, ..., 1, 2n-1, 2n), could also be submitted. -
> Maximilian
>
>
>>> Hi Everyone,
>>>
>>> Please see the sequence below. I just want to see if thereis there is a
>>> better way to write its definition. OEIS editors usually strugglewith my
>>> language, and I would really appreciate it if you could help me maketheir
>>> job easier.
>>>
>>> The sequence:
>>>
>>> 1 ,2 ,2 ,3 ,1 ,2 ,1 ,4 ,5 ,1 ,2 ,4 ,1 ,5 ,1 ,2 ,5 ,1 ,2 ,8 ,4,5 ,3 ,4 ,3
>>> ,6 ,1 ,8 ,3 ,2 ,5 ,4 ,7 ,6 ,2 ,3 ,9 ,1 ,2 ,12 ,4 ,5 ,3 ,4 ,8 ,9 ,7,8 ,3
>>> ,10
>>> ,1 ,12 ,3 ,2 ,5 ,4 ,7 ,6 ,9 ,8 ,11 ,10 ,2 ,3 ,13 ,1 ,2 ,16 ,4 ,5 ,3 ,4,8
>>> ,9
>>> ,7 ,8 ,12 ,13 ,11 ,12 ,3 ,14 ,1 ,16 ,3 ,2 ,5 ,4 ,7 ,6 ,9 ,8 ,11 ,10 ,13
>>> ,12,15 ,14 ,2 ,3,……
>>>
>>> The definition:
>>> a(1)=1; a(2)=2;
>>> a(n)=n-m1, if a(n-1) is odd;
>>> a(n)=n-m2, if a(n-1) is even;
>>> m1 is the most recent position of the largest term up toa(n-1);
>>> m2 is the most recent position of the second largest term upto a(n-1)
>
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list