cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A101941 Peak-trough transform of the omega sequence (A001221).

Original entry on oeis.org

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

Views

Author

Neil Fernandez, Dec 22 2004

Keywords

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

Extensions

Corrected by Peter Munn, May 26 2023