A134853 Generalized mountain numbers.
1, 2, 3, 4, 5, 6, 7, 8, 9, 120, 121, 130, 131, 132, 140, 141, 142, 143, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 165, 170, 171, 172, 173, 174, 175, 176, 180, 181, 182, 183, 184, 185, 186, 187, 190, 191, 192, 193, 194, 195, 196
Offset: 1
Examples
The number of this sequence (A134853) is a generalized mountain number. . . . . . . . . . 8 . . . . . . . . . . . . . . . . . . 5 . . . 4 . . . . 3 . . . 3 . . . . . . 1 . . . . . . . . . . .
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
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[-1] == R[-1]) afull = list(range(1, 10)) afull += sorted(int("".join(map(str, t))) for t in s if t[0] != 0) print(afull[:60]) # Michael S. Branicky, Aug 02 2022
Extensions
Better definition and edited by Omar E. Pol, Nov 11 2009
Comments