login
A379880
a(n) is the length of the n-th maximum run of consecutive terms of A377091 in arithmetic progression with common difference 1 or -1.
5
3, 2, 3, 2, 3, 4, 4, 1, 4, 6, 1, 4, 6, 1, 3, 2, 3, 1, 8, 4, 9, 1, 4, 3, 9, 1, 9, 11, 1, 9, 11, 1, 3, 2, 3, 2, 3, 1, 13, 1, 1, 4, 3, 14, 1, 4, 8, 14, 1, 1, 2, 3, 8, 16, 1, 1, 2, 3, 8, 16, 1, 16, 18, 1, 16, 18, 1, 3, 2, 3, 2, 3, 2, 3, 19, 1, 4, 15, 21, 1, 4, 15
OFFSET
1,1
COMMENTS
Since the terms in A377091 are required to be distinct, in this arithmetic progression the differences are either all +1 or all -1. - N. J. A. Sloane, Jan 20 2025
LINKS
Rémy Sigrist, C++ program
EXAMPLE
A377091 begins:
0, 1, 2, -2, -1, 3, 4, 5, -4, -3, 6, 7, 8, -8, -7, -6, -5, -9.
So the present sequence begins:
3, 2, 3, 2, 3, 4.
MATHEMATICA
(* A377091list is defined at A377091 *)
Map[Length, Most[Split[A377091list[500], Abs[#2 - #1] == 1 &]]] (* Paolo Xausa, Jan 20 2025 *)
PROG
(C++) // See Links section.
CROSSREFS
Cf. A377091, A380223 (positions of ones).
Sequence in context: A262785 A264843 A316290 * A029211 A246925 A217618
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 05 2025
STATUS
approved