login
A380505
Split A377091 into sublists consisting of runs of terms with the same sign. Sequence gives k's such that A377091(k) is the first term of those sublists whose terms form an arithmetic progression with common difference 1 or -1.
3
0, 1, 3, 5, 8, 10, 26, 37, 53, 82, 101, 122, 148, 197, 226, 257, 290, 325, 401, 442, 485, 530, 1024, 1088, 1093, 1157, 1225, 1370, 1521, 1526, 1599, 1602, 1682, 1765, 1850, 2116, 2210, 2303, 2306, 2400, 2403, 2501, 2602, 2708, 2915, 2920, 3026, 3137, 3365, 3482
OFFSET
1,3
EXAMPLE
A377091 with terms grouped by sign begins:
(0) (1 2) (-2 -1) (3 4 5) (-4 -3) (6 7 8) (-8 -7 -6 -5 -9 -10 -11 -12) ...
And the corresponding terms of the present sequence are therefore:
0 1 3 5 8 10 * ...
(where * indicates sublists whose terms do not form an arithmetic progression with common difference 1 or -1).
MATHEMATICA
(* A377091list is defined at A377091 *)
With[{A377091 = A377091list[5000]}, Flatten[Map[FirstPosition[A377091, First[#]] - 1 &, Select[Most[SplitBy[A377091, Sign]], # == Range[Min[#], Max[#]] || # == Range[Max[#], Min[#], -1] &]]]]
CROSSREFS
Union of A380503 and A380504.
Sequence in context: A217919 A127700 A101907 * A242250 A117668 A184410
KEYWORD
nonn
AUTHOR
Paolo Xausa, Jan 26 2025
STATUS
approved