reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
Canyon numbers. Numbers with exactly one locally minimal digit and with exactly two locally maximal digits which are the same digit and non-adjacentnonadjacent.
Because they are nonadjacent, the maxima occur at the end (and the minimum somewhere between), and the sequence of digits must be decreasing up to the minimum, then increasing. This may be taken as part of the definition (which entails non-adjacency nonadjacency of the maxima).
The structure of digits represent represents a canyon (a deep valley between cliffs). The first digit is equal to the last digit. The first group of digits are in decreasing order. The second group of digits are in increasing order. The digits have a unique smallest digit which represents the bottom of the canyon.
This sequence is finite - - it has 116505 elementsterms. The largest and final element term of the sequence is a(116505) = 9876543210123456789.
4 . . 4
. . . .
. . . .
. . . .
. . . .
. 1 . .
. . 0 .
approved
editing
proposed
approved
editing
proposed
(Python)
from itertools import chain, combinations as combs
ups = list(chain.from_iterable(combs(range(10), r) for r in range(2, 11)))
s = set(L[::-1] + R[1:] for L in ups for R in ups if L[0] == R[0])
afull = sorted(int("".join(map(str, t))) for t in s if t[0] == t[-1])
print(afull[:60]) # Michael S. Branicky, Aug 02 2022
approved
editing
Kellen Myers, <a href="/A134970/b134970_1.txt">Table of n, a(n) for n = 1..116505</a>
reviewed
approved
proposed
reviewed