|
| |
|
|
A134941
|
|
Mountain numbers.
|
|
22
|
|
|
|
1, 121, 131, 141, 151, 161, 171, 181, 191, 1231, 1241, 1251, 1261, 1271, 1281, 1291, 1321, 1341, 1351, 1361, 1371, 1381, 1391, 1421, 1431, 1451, 1461, 1471, 1481, 1491, 1521, 1531, 1541, 1561, 1571, 1581, 1591, 1621, 1631, 1641, 1651, 1671
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,2
|
|
|
COMMENTS
|
For n>1 the structure of digits represent a mountain. The first digit is 1. The last digit is 1. The first digits are in increasing order. The last digits are in decreasing order. The numbers only have one largest digit. This sequence is finite. The last member is 12345678987654321.
The total number of terms is 21846. - Hans Havermann, Nov 25 2007
A002450(8) + 1 = 21846. [From Reinhard Zumkeller, May 17 2010]
Contribution from Reinhard Zumkeller, May 25 2010: (Start)
A178333 is the characteristic function of mountain numbers: A178333(a(n)) = 1;
A178334(n) = number of mountain numbers <= n;
A178052 and A178053 give sums of digits and digital roots of mountain numbers;
A178051(n) = peak value of the n-th mountain number. (End)
|
|
|
LINKS
|
J. Zucker, Table of n, a(n) for n = 1..21846 (shows all terms).
|
|
|
EXAMPLE
|
The A-number of this sequence (A134941) is itself a mountain number:
. . . 9 . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . 4 . 4 .
. 3 . . . .
. . . . . .
1 . . . . 1
|
|
|
MATHEMATICA
|
mountainQ[n_] := MatchQ[ IntegerDigits[n], {1, a___, b_, c___, 1} /; OrderedQ[{1, a, b}, Less] && OrderedQ[ Reverse[{b, c, 1}], Less]]; mountainQ[1] = True; Select[Range[2000], mountainQ] (* Jean-François Alcover, Jun 13 2012 *)
|
|
|
PROG
|
(Haskell)
import Data.List (elemIndices)
a134941 n = a134941_list !! (n-1)
a134941_list = elemIndices 1 a178333_list
-- Reinhard Zumkeller, Oct 28 2001
|
|
|
CROSSREFS
|
Cf. A134853, A135417, A134951.
Cf. A115300, A175044. [From Reinhard Zumkeller, May 25 2010]
Sequence in context: A055468 A134328 A113614 * A173070 A044867 A162531
Adjacent sequences: A134938 A134939 A134940 * A134942 A134943 A134944
|
|
|
KEYWORD
|
base,fini,full,nonn
|
|
|
AUTHOR
|
Omar E. Pol, Nov 22 2007, Dec 22 2007, May 18 2008, Dec 23 2008
|
|
|
STATUS
|
approved
|
| |
|
|