login
A101941
Peak-trough transform of the omega sequence (A001221).
2
0, 0, 0, 0, 0, 3, 0, 0, 0, 1, -1, 1, -1, 0, 0, 0, 0, 1, -1, 0, 0, 0, -1, 1, -1, 1, -1, 1, -1, 11, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, -1, 11, -1, 0, 0, 0, -1, 1, -1, 0, 0, 0, -3, 0, 0, 0, 0, 0, -1, 5, -1, 0, 0, -2, 0, 3, -2, 0, 0, 3, -1, 1, -1
OFFSET
1,6
COMMENTS
I define the peak-trough transform (b(n)) of sequence (c(n)) as follows. If c(n) is greater than both of its immediate neighbors, b(n) is defined as the largest k <= n-1 such that c(n) is greater than its k nearest neighbors both before and after it in the sequence. (c(n) is said to be a k-peak of the sequence). If c(n) is smaller than both of its immediate neighbors, b(n) is defined as -k, where k is the largest k <= n-1 such that c(n) is smaller than its k nearest neighbors both before and after it in the sequence. (c(n) is said to be a k-trough of the sequence). Otherwise, b(n) is 0. (Note difference between a k-peak and a k-apex as defined by Joseph L. Pe in A076759).
CROSSREFS
KEYWORD
sign
AUTHOR
Neil Fernandez, Dec 22 2004
EXTENSIONS
Corrected by Peter Munn, May 26 2023
STATUS
approved