The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A178333 Characteristic function of mountain numbers. 5
 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS a(A134941(n)) = 1; a(A134951(n)) = 1; a(n) = 0 for n > 12345678987654321; a(A011540(n))=0; a(A052383(n))=0; a(A171901(n))=0; A178334(n) = SUM(a(k): 0<=k<=n). LINKS R. Zumkeller, Table of n, a(n) for n = 0..20000 FORMULA a(n) = if n mod 10 = 1 then if n = 1 then 1 else g(n div 10, 1) else 0 with g(x, y) = if x mod 10 > y then g(x div 10, x mod 10) else if x mod 10 = y then 0 else h(x div 10, x mod 10) and h(x, y) = if y = 1 then 0^x else if x mod 10 < y then h(x div 10, x mod 10) else 0. MATHEMATICA a[n_] := Boole[ MatchQ[ IntegerDigits[n], {1, a___, b_, c___, 1} /; OrderedQ[{1, a, b}, Less] && OrderedQ[ {b, c, 1}, Greater]]]; a[1]=1; Table[a[n], {n, 0, 200}] (* Jean-François Alcover, Jun 13 2012 *) PROG (Haskell) a178333 n = fromEnum \$    n `mod` 10 == 1 && a000030 n == 1 && a196368 n == 1 && and down where       down = dropWhile (== False) \$ zipWith (<) (tail \$ show n) (show n) a178333_list = map a178333 [0..] -- Reinhard Zumkeller, Oct 28 2001 CROSSREFS Cf. A000030, A196368. Sequence in context: A173950 A157928 A159075 * A063524 A326168 A033683 Adjacent sequences:  A178330 A178331 A178332 * A178334 A178335 A178336 KEYWORD nonn,base AUTHOR Reinhard Zumkeller, May 25 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 19 09:35 EST 2020. Contains 331048 sequences. (Running on oeis4.)