[Question]
  [
# Mountain range number
A number is a mountain range number if the inequalities satisfied by their consecutive digits alternate. In a way, looking at the number's digits should exhibit a `/\/\/\...` or a `\/\/\/...` pattern.
More formally, if our number `n` has \$k\$ digits
$$n = d\_1d\_2d\_3\cdots d\_k$$
then `n` is a mountain range number if
$$\begin{cases}d\_1 > d\_2 \\ d\_2 < d\_3 \\ d\_3 > d\_4 \\ \cdots \end{cases} \vee \begin{cases}d\_1 < d\_2 \\ d\_2 > d\_3 \\ d\_3 < d\_4 \\ \cdots \end{cases}$$
# Your task
Given an integer with 3 or more digits, output a Truthy value if the number is a mountain range number or Falsy otherwise.
# Input
A positive integer `n` with 3 or more digits, in any reasonable format, e.g.
* Integer
* String
* List of digits
# Test cases
### Truthy
```
1324 -> Truthy
9191 -> Truthy
12121 -> Truthy
121212 -> Truthy
1212121 -> Truthy
19898 -> Truthy
```
### Falsy
(Added another Falsy test case as per the comments, some answers might not cover the 4422 test case)
```
123 -> Falsy
321 -> Falsy
4103 -> Falsy
2232 -> Falsy
1919199 -> Falsy
4422 -> Falsy
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest answer in bytes wins! Standard loopholes are forbidden.
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
¥ü*0‹P
```
[Try it online!](https://tio.run/##yy9OTMpM/f//0NLDe7QMHjXsDPj/39DYyAQA "05AB1E – Try It Online")
With truthy and falsy reversed, this would be 5 bytes:
```
¥ü*dZ
```
[TIO](https://tio.run/##yy9OTMpM/f//0NLDe7RSov7/NzQ2MgEA)
[Answer]
# [R](https://www.r-project.org/), ~~44~~ 40 bytes
 crossed out 44 is [still](https://codegolf.stackexchange.com/q/170188/86301) regular 44
-1 byte thanks to Giuseppe.
```
function(x,d=diff)all(d(sign(d(x)))^2>3)
```
[Try it online!](https://tio.run/##K/qfpmD7P600L7kkMz9Po0InxTYlMy1NMzEnRyNFozgzPQ9IVWhqasYZ2Rlr/k/TSNYw1DHSMdbU5AKxjYFsQyjbUAfEM4HyTHQMdQzg6iyBPEu4SiOQCTpGcH1AM1DMgfIxVaCogpoJxJZIYhYgrKn5HwA "R – Try It Online")
Computes the differences of the signs of the differences of the input. These must all be equal to 2 or -2, i.e. the square must equal 4; checking that the square is >3 is sufficient.
If two consecutive digits are equal, there will be a 0 in the signs of differences, leading to a difference of signs of differences equal to 1 or -1. If three consecutive digits are in ascending or descending order, then the corresponding differences will be of the same sign, leading to a difference of signs of differences equal to 0. If neither of these occurs, the number is a mountain range number.
---
Old version (included as it might be golfable):
# [R](https://www.r-project.org/), ~~44~~ 43 bytes
-1 byte thanks to Giuseppe.
```
function(x)all(s<-sign(diff(x)),rle(s)$l<2)
```
[Try it online!](https://tio.run/##K/qfpmD7P600L7kkMz9Po0IzMSdHo9hGtzgzPU8jJTMtDSikqVOUk6pRrKmSY2Ok@T9NI1nDUMdIx1hTkwvENgayDaFsQx0QzwTKM9Ex1DGAq7ME8izhKo1AJugYwfUBzUAxB8rHVIGiCmomEFsiiVmAsKbmfwA "R – Try It Online")
Computes the signs of the differences of consecutive digits. Then verifies that
* none of the signs are 0s (would correspond to 2 equal consecutive digits);
* the runs of the signs are all equal to 1, i.e. no 2 consecutive signs are equal.
[Answer]
# JavaScript (ES6), ~~35~~ 33 bytes
```
a=>!a.some(p=v=>a*(a=p-(p=v))>=0)
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1k4xUa84PzdVo8C2zNYuUUsj0bZAF8TR1LSzNdD8n5yfV5yfk6qXk5@ukaYRbahjrGOkYxKrqakAAfr6CiFFpSUZlVxoKi11DHWAmAiVhkATwRimlrBKHSOIWmJUQszFo9JSxwKEMW3HZqgxwkNgpW6JOcUYZhoj@wafQhOgAw2QzcSl0AhkNczX@BSCAx2KLaEeByv8DwA "JavaScript (Node.js) – Try It Online")
### Commented
```
a =>                // a[] = input list of digits,
                    //       re-used to store the last difference 
  !a.some(          //
    p =             // initialize p to a non-numeric value
    v =>            // for each v in a[]:
      a * (         //   multiply a by
        a =         //     the new value of a defined as
          p -       //       the difference between p and
          (p = v)   //       the new value of p, which is v
      )             //
      >= 0          //   the test fails if this is non-negative
  )                 // end of some()
```
[Answer]
# Jelly, ~~[7](https://tio.run/##y0rNyan8/9/z8PRjcx/uXGCr@3DXgv@H2x81rfn/PzraUMdYx0jHJFaHK9pSx1AHiEFMQ6AYGKNwdIzQuDB5Sx0LEIbJGoMYxjBpE6BKA4iYEUgSZgrUOiC2jI0FAA)~~ 6 bytes
A benchmarking solution.
A monadic link taking as input the list of digits
```
I×Ɲ<0Ạ
```
You can [try it online](https://tio.run/##y0rNyan8/9/z8PRjc20MHu5a8P///2hjHSiMBQA) or [verify all test cases](https://tio.run/##y0rNyan8/9/z8PRjc20MHu5a8P9w@6OmNf//R0cb6hjrGOmYxOpwRVvqGOoAMYhpCBQDYxSOjhEaFyZvqWMBwjBZYxDDGCZtAlRpABEzAknCTIFaB8SWsbEA).
```
I         Take the forward differences
  Ɲ       and for each pair,
 ×        multiply them together.
   <0     Check if those are below 0.
      Ạ   Check if this array of booleans only contains Truthy values.
```
*-1 byte* thanks to @79037662
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-!`](https://codegolf.meta.stackexchange.com/a/14339/), 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Takes input as a digit array.
```
äÎä* dÄ
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LSE&code=5M7kKiBkxA&input=WzEsMiwxXQ)
[Answer]
# [Haskell](https://www.haskell.org/), ~~57~~ ~~55~~ ~~47~~ ~~44~~ 42 bytes
```
all(<0).z(*).z(-)
z f(x:s)=zipWith(f)s$x:s
```
[Try it online!](https://tio.run/##LYpBDsIgFET3PcVfuABDDR9cSGPP4aI2kVhRIq1EGtP08CIYNjN5b@ahw/PmXDTtOWrnyJHT3Uq2OWparWDI0gTartaf7PwghoZNEnGwdzsH4NBC11eFlkQLXMbXcAHk0EDxJMnBfrKkVTVqO6Wjf9tp3ozag/ln@XYoJJMCGUqxZ3vkkilUyISQgqHAvOQskDHvSqU@qEMfv1fj9D3E@ur9Dw "Haskell – Try It Online")
Takes input as a list of digits.
* -2 by swapping the order of `s` and `x:s`
* -8 by using a different helper function
* -3 by using partial application and pointfree code
* -2 by excluding `f=` from the submission (which I didn't realize was allowed :P)
[xnor improved my answer using `>>=`.](https://codegolf.stackexchange.com/a/199086/89930)
[Answer]
# [Python](https://docs.python.org/3/), 47 bytes
```
f=lambda a,b,*l:l==()or(a-b)*(b-l[0])*f(b,*l)<0
```
[Try it online!](https://tio.run/##fZCxCoMwFEX3foXQwbzwAsY4VGnWfkE3cUgoYiFVsXbw61NjKkprDdwpJ@fdl3boq6YW1pbSqIe@qUChRmoyIyWBpiOKaaBEM5NHBdCSuEs4R7bt7nVPSkJzjgJjTAqAwJ9jcO1efTUcFiZFjmN2GT5apszUHoOxp/YZ79pkUjy5/JkVspByDl9WsfR3Ly7KPNdSsS6/jSRjq2jt@UViN2hebxuZ/vKT1G84IfYN "Python 3 – Try It Online")
Takes input splatted like `f(1,2,3,4)`. Same idea as my second [Haskell answer](https://codegolf.stackexchange.com/a/199086/20260).
[Answer]
# APL+WIN, ~~17~~ ~~15~~ ~~12~~ 11 bytes
5 bytes saved thanks to Jo King & 1 byte thanks to Bubbler. Turning into a real team effort!
Prompts for list of digits:
```
×/0>2×/2-/⎕
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcjzra0/4fnq5vYGcEJI109YFS/4GC/9O4DBWMFYwUTLjSuCwVDBWAmAskZqQAxshsBSOuNAVkLlTaUsEChKFKjYG0MVTOBKjKACxiBJIBGQBWD8OWAA "APL (Dyalog Classic) – Try It Online") (Dyalog Classic)
[Answer]
# [Husk](https://github.com/barbuz/Husk), 7 bytes
```
Λ<0Ẋ*Ẋ-
```
[Try it online!](https://tio.run/##yygtzv7//9xsG4OHu7q0gFj3////0YY6RjrGsQA "Husk – Try It Online")
Algorithm taken from the APL answer.
## Explanation
```
Λ<0Ẋ*Ẋ-
     Ẋ- subtract pairs of consecutive elements
   Ẋ*   multiply pairs of consecutive elements
Λ       return truthy value if all elements are:
 <0     lesser than 0
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), (5?) 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
5 if we may invert the truthy/falsey output (strip the trailing `¬`).
```
IṠIỊẸ¬
```
**[Try it online!](https://tio.run/##y0rNyan8/9/z4c4Fng93dz3ctePQmv@H2x81rfn/PzraUMdYx0jHJFaHK9pSx1AHiEFMQ6AYGKNwdIzQuDB5Sx0LEIbJGoMYxjBpE6BKA4iYEUgSZgrUOiC2jI0FAA "Jelly – Try It Online")**
[Answer]
# [Haskell](https://www.haskell.org/), 37 bytes
```
all(<0).g(*).g(-)
g=(=<<tail).zipWith
```
[Try it online!](https://tio.run/##LYpBDoMgFET3noJFF9Cg4YMLaeQcXVgTiVYkRUsqaUwPXyqNm5m8NzPp9XF3Lo7qFrVzuGakMPicIieZUVjVddDWkeJj/dWGKQ7W2LAihhRq2uygbacNdfNz6BAwdEGHx7sc7DtJkmWztst@9C@7hNOsPRr/eXwb4IIKDhQEL2kJTFAJEijnglPgkJaUByRMu5R7V7Jq47cfnTZrzHvvfw "Haskell – Try It Online")
Takes the `zipWith`-based [answer of 79037662](https://codegolf.stackexchange.com/a/199061/20260) and generalizes out the pattern of 
```
g(?) = \s->zipWith(?)(tail s)s
```
that applies the operator `(?)` to pairs of adjacent elements. This is shortened to the pointfree `g=(=<<tail).zipWith`.
We first apply `g(-)` to the input to take differences of consecutive elements, then `g(*)` to take products of those consecutive differences. Then, we check that these products are all negative, which means that consecutive differences must be opposite in sign.
---
# [Haskell](https://www.haskell.org/), 40 bytes
```
f(a:b:t)=t==[]||(a-b)*(b-t!!0)<0&&f(b:t)
```
[Try it online!](https://tio.run/##LYrLCoMwFET3fsUViiQlQm7iwkjzJSIYsbbBR6WG4sJ/TxPIZoZzZt7mmJ/L4v1ETDM0jmqnddtdFzHlQO9kKF2ec/rgRTGRuPvRvqw7gIOGtssSnYFO6NfP2ANyaCB5EuRof1HSLFuN3cJx/9rNwQ1Ws8OUOv1bFJJJgQylqFiFXDKFCpkQUjAUGJeYCSLGXanQtao7/wc "Haskell – Try It Online")
The idea is a bit clearer to see in the slightly less-golfed form:
**42 bytes**
```
f(a:b:c:t)=(a-b)*(b-c)<0&&f(b:c:t)
f _=1>0
```
[Try it online!](https://tio.run/##LYpBDoMgFET3nuIvGgMNJnxwIaT2IsZU1NKSqjXVNN6eQspmJu/NPM32uk@T95YY3etB77QmpujpmfTFQC88zy35@8zCrcYr96N7uH0DDjU0bZboCHRAN7/HDpCDhuRJkKP7RkmzbDZuCcf145YdTjCbFWzq9G9QSCYFMpSiZCVyyRQqZEJIwVBgXGImiBh3pUJXqmr9Dw "Haskell – Try It Online")
We check that the first three digits `(a,b,c)` have the `a->b` steps and `b->c` steps going opposite directions by checking that the differences `a-b` and `b-c` have opposite signs, that is, their product is negative. Then we recurse to the list without its first element until the list has fewer than 3 elements, where it's vacuously true.
An alternative to check suffixes directly turned out longer:
**43 bytes**
```
f l=and[(a-b)*(b-c)<0|a:b:c:t<-scanr(:)[]l]
```
[Try it online!](https://tio.run/##LYpBDoMgFET3nuIvupAGEz@4EKInISSi1JZUqVHTuOjdKSRsZvLezMsc78eyhDDD0htvVWmqkdzLsZpIV/@MHOUkz646JuP3UhKlFx2se7rzgBp6ULrIdEW6YFg/dgCsQUL2ZZTWfZMkRbEa5@Nx250/4Qar2WDOnf8KGaecIUXOGtpgzalAgZQxzigyTEvKDAnTLkTsVrQ6/AE "Haskell – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~65~~ 58 bytes
```
lambda A:all((x-y)*(y-z)<0for x,y,z in zip(A,A[1:],A[2:]))
```
[Try it online!](https://tio.run/##bY1BDoIwEEXX9hTdtZUS6JQFJWrCBbgAElJjiCSAxLgQLo/TgsaFmWT@/Pd/03F63u4DLM3xvHS2v1wtzTPbdZy/wkns@RTO4hA39wd9yUnOtB3o3I48l3mpsgo3ZJUQiysULiyZ0pAwSZlRRjlVgPM9wF8mNemKtBO9FhIVewugt5ob46MEgFUZ2Y2PdnjSAlF4wqDhvR05IlkIQQhjjNg6JhxXYGslIiD8x9CA2hocRRYl3qpNwXX/Yq/68yrd4nSL15rGFH9f3g "Python 2 – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 9 bytes
```
¬{s₃.o↙Ḋ}
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r//9Ca6uJHTc16@Y/aZj7c0VX7/3@0oY6ljgUIx/4HAA "Brachylog – Try It Online")
Takes a list of digits as input.
### Explanation
```
¬{      }       It is impossible…
  s₃            …to find a subsequence of 3 elements…
    .o↙Ḋ        …which is already ordered
```
Slight subtility: `o↙Ḋ` is used to check whether the digits are increasing or decreasing. By default, `o` (which is the same as `o₀`) is for increasing order, and `o₁` is for decreasing order. By using `o↙Ḋ` (`Ḋ` being an integer between `0` and `9`), we check that the whole predicate is impossible for `o₀`, or `o₁`, or `o₂`, …, `o₉`. `o₂` to `o₉` are not implemented and thus will fail, which doesn’t impact the program as a whole.
If `true.` is an acceptable falsy value, and `false.` an acceptable truthy value (which I don’t think it should be), then you should be able to remove these 3 bytes: `¬{…}`.
[Answer]
# Excel (Insider build ver. 1912), 122 Bytes
```
A1 'Input
B1 =SEQUENCE(LEN(A1))
C1 =MID(A1,B1#,1)
D1 =SIGN(IF(NOT(B1#-1),C1-C2,C1#-INDEX(C1#,B1#-1)))
E1 =(SUM(D1#)=D1*ISODD(LEN(A1)))*PRODUCT(D1#) 'Output
```
Returns ±1 (truthy) or 0 (falsy)
Explanation (can add more detail if people are interested)
```
B1 =SEQUENCE(LEN(A1)) ' Generates a spill array from 1 to the length of the input
C1 =MID(A1,B1#,1) ' Splits characters into rows. Using each value in the spill array B1#
                  ' as a charcter index
D1 =SIGN(IF(NOT(B1#-1), ' Choose different value on the first cell
           C1-C2, ' Use the opposite of the first difference between digits
           C1#-INDEX(C1#,B1#-1))) ' get the difference between each digit and the previous
E1 =(SUM(D1#)=D1*ISODD(LEN(A1))) ' Sum the digit differences, if the 
                                 ' input length is even check if 0, else check if equal to
                                 ' thefirst row of the differences
       *PRODUCT(D1#))            ' ensure there aren't any repeated digits
```
Tests
[![enter image description here](https://i.stack.imgur.com/UxYwg.png)](https://i.stack.imgur.com/UxYwg.png)
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-nl`, ~~57~~ 41 bytes
Replaces each character in the input string with the `cmp` comparison (`<=>` in Ruby) between it and the next character `$'[0]` (if there is no next character, remove the character instead). Then, check if the resulting string consists entirely of alternating `1` and `-1`.
```
gsub(/./){$&<=>$'[0]}
p~/^1?(-11)*(-1)?$/
```
[Try it online!](https://tio.run/##KypNqvz/P724NElDX09fs1pFzcbWTkU92iC2lqugTj/O0F5D19BQUwtIatqr6P//b2hsZMJlaWhpyGVoBIQQ0ojL0NLC0oILzDIy5jIGSpgYGhhzGRkZg@RA0PJffkFJZn5e8X/dvBwA "Ruby – Try It Online")
### Old Solution, 57 bytes
Check for duplicate consecutive numbers first by checking if the input string matches `/(.)\1/` and inverting it. If no such pairs are found, replace each character with `true` or `false` based on whether its `cmp` style comparisons (`<=>`) to the character before it `$`[-1]` and after it `$'[0]` are not equal. (If there is no character before or after it, the `<=>` returns `nil`, which is definitely not equal to whatever the other character comparison returns.) Finally, it checks if the result does *not* contain an `f` (meaning no falses were returned).
```
p ! ~/(.)\1/&&gsub(/./){($`[-1]<=>$&)!=($&<=>$'[0])}!~/f/
```
[Try it online!](https://tio.run/##KypNqvz/v0BBUaFOX0NPM8ZQX00tvbg0SUNfT1@zWkMlIVrXMNbG1k5FTVPRVkNFDcRUjzaI1axVrNNP0///39DYyITL0tDSkMvQCAghpBGXoaWFpQWQY8xlDBQ0MTQw5jIyMgaJg6Dlv/yCksz8vOL/unk5AA "Ruby – Try It Online")
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 147 144 bytes
```
M(){
a=${1:0:1}
d=x
i=1
while [ $i -lt ${#1} ]
do
b=${1:$i:1}
case $d$((a-b)) in
[ux]-*)d=d;;*0|u*|d-*)return 1;;*)d=u;;esac
a=$b
let i++
done
}
```
[Try it online!](https://tio.run/##bVJNb6MwFLz7V7xlUZukQvIHX27kHnvrras9RDmQ2FksERKBUYPS/PbUmHYLpPjimTfz3viJTVbn1@vLbH5GmfDP5BE/kguS4oS0IOgt14WCFfgagsKAf/5NLrBG8oA2TuzrTr3NagW@9GezLNjM56BLtGpO62Axl0Iulwv83izepYWVMk1VArGcLTXLpaqzbTd3gwplQD882NalQpdrP7hSmbTdjo0B2ez3LajTUW2Nkl0CsJ/ewWoFnu80HghQ@6NpYb12VZOr0l2ctJMIB3cafblf/ptvHZWqm8KI16oxeetYVdRqWn7OirodtS0PRolRvK/YHvwSFvZOz8aEu7sfFH/K2iK900r@@BQ34G91KP@N5qptfvjexX3wdD@Y5fmdy@v3eyWMhhA8wefbOOFkAAm1Z4rpDTGS8JSnIwXrUL8c1kt7EBI8KFHK6DciXRDOB07OeNidNOJWGVGOCaaY4RBHOMYJTrE1UKeKeMwTGwMPYrhJw3WiJGVJGCcsDpM0jmjMwsheEpYOMk1dCE@J0w3RTpn@T5yQHw "Bash – Try It Online")
I seem to like trying shell submissions, and learned some bash-isms in golfing this one. 
`$((a-b))` is equivalent to `$(( $a - $b ))` -- apparently you don't need the $ inside a $(( )) construct.
There is a ++ operator, works in $(( )) and in `let`
Subtracting letters is accepted, strangely. One of my samples in the TIO reads "xy", and apparently `$((a-b))` evaluates `a` to `x`, and then variable `x` to an empty string and the empty string as numeric zero, and comparable for b and y. If I set x and y in the environment, those values are used.
Edit: -3 bytes by not putting whitespace after ;;, thanks to S.S.Anne
[Answer]
# [J](http://jsoftware.com/), 15 bytes
```
[:*/0>2*/\2-/\]
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/o6209A3sjLT0Y4x09WNi/2typSZn5CukKRgqGCsYKZgoKCjARCyBYiCMUGEExZgiRljFkFVaKliAMRdESF2dC1mHMVylMYo@EyDbAEnWCKzWCMVcGLYEmv0fAA "J – Try It Online")
*-7 bytes thanks to RGS's technique*
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~29~~ 27 bytes
```
ＵＭθ⁻ι§θ⊕κＵＭθ×ι§θ⊕κ›⁰⌈…θ⁻Ｌθ²
```
[Try it online!](https://tio.run/##S85ILErOT8z5/983scA5Pzc3MS9Fo1BHwTczr7RYI1NHwbHEMy8ltQIk5pmXXJSam5pXkpqika0JBNZcqJpCMnNTidAUUJSZV6LhXpSaWJJapGEAtCyxIjO3NFfDuTI5J9U5I78A4QKf1Lz0kgyNQk0dBSNNsPb//6OjDXUULHUULCBkbOx/3bIcAA "Charcoal – Try It Online") Link is to verbose version of code. Takes input as a list of digits and outputs as a Charcoal boolean (`-` for a mountain range number, otherwise no output). Explanation:
```
ＵＭθ⁻ι§θ⊕κ
```
Take consecutive differences (cyclic, so includes difference between last and first digit).
```
ＵＭθ×ι§θ⊕κ
```
Take consecutive products (again, cyclic).
```
›⁰⌈…θ⁻Ｌθ²
```
All results bar the last two must be negative.
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), 22 bytes
```
XX2COqcm^m2COPD{0.<}al
```
[Try it online!](https://tio.run/##SyotykktLixN/Z@TV/0/IsLI2b8wOTcuF0gHuFQb6NnUJub8r82N/m9obGTCZWloachlaASEENKIy9DSwtICyDHmMgYKmhgaGHMZGRmDxEHQEgA "Burlesque – Try It Online")
```
XX      # Explode into digits
2CO     # 2-grams ("abc"->{"ab" "bc"})
qcm^m   # Compare each via UFO operator
2CO     # 2-grams
PD      # Product
{0.<}al # All less than 0
```
[Answer]
# [K (ngn/k)](https://bitbucket.org/ngn/k), 14 bytes
```
&/0>2_*':-':$:
```
[Try it online!](https://tio.run/##y9bNS8/7/z/NSk3fwM4oXkvdSlfdSsXqf4lVtUp0ZV2RVZpChXVCfra1RkJaYmaOdYV1pXWRZmwtV0m0obGRiYKCgrVhLJBjaWhpCOcYGgEhCscIhWMI5VhaWFoglBkrgAwwAHGMQdphHBNDA2M4x8jI2AjOMQTZamkJ5PwHAA "K (ngn/k) – Try It Online")
`$:` as string
`-':` subtract (as ascii codes) each prior; implicit 0 before first
`*':` multiply by each prior; implicit 1 before first
`2_` drop first 2 elements
`&/0>` all negative?
[Answer]
# [Python 3](https://docs.python.org/3/), ~~101~~ \$\cdots\$ ~~103~~ 94 bytes
Added 13 bytes to fix error kindly pointed out by @ChasBrown.  
Saved 9 bytes thanks to @ChasBrown!!!
```
def f(l):x=[a<b for a,b in zip(l[1:],l)];return all(a!=b for a,b in zip(x[1:]+l[1:],x[:-1]+l))
```
[Try it online!](https://tio.run/##fZCxDoIwFEV3v6LGgVYfiQUGQVn9AjfCUCIEkgZIhQT8@dpSUQxIkzs0OT3vvtZ9k1elK@U9zVCGOQm6MGKXBGWVQAwSVJToWdSYRzSIgZP4LNKmFSVinGO2DWdgp8GDwbsosKm6ECJrUZQNznBEwQUHvJgQZM4O3UTb5P3mg/hAQWUNocoxZIRWEHAMtIoY0xLiw0nnzyDLtvaUkl@n@62uH1wZf0yU7rT3IuGpRsepZUY4esq42CIxfOE7vtltNsVTlrlDvgA "Python 3 – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 59 bytes
```
d;m(int*s){for(d=*s/s[1];s[1]&&s[1]/ *s-d;d^=1)s++;s=s[1];}
```
Takes as input a wide string of digits and returns zero if that number is a mountain range number.
*-12 bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!*
[Try it online!](https://tio.run/##bVHfT4MwEH7nr7jUbGlhk7XsYdgx33zy0beJhrTgSDYwbdHMZX87thDnQK/J3fW77370KuZvQrSt5AdcVsbX5FTUCsvE16He0pQ7NZ06HYKv55LLl4QSHQRcJx3h3N6Uldg3Moe1NrKsb3cb7xf6FLtMOciz5eGQlRX@qEtJvJMHVrrwqwHfiG0KSYf1ESdhCEY1@eX@iGjElmh2BcQ0pgOAMnv@IuwfaESLV/HqCrHNi2yvB91ZNEiJRiWWdDEkMBaNGrt543iYtWQ/pDP3Ouv@wO3LQAILbs0adPmV1wU2goQXd7tIiY0GARkt7l3Z7AKjyV7DfAMT/VyhGdgEk87ggDuHwD2gB/vCI4I7QE@qMbsjIrwfpJ9D5aZRlR3BO7ff "C (gcc) – Try It Online")
[Answer]
# [Java (JDK)](http://jdk.java.net/), ~~95~~ 83 bytes
```
p->{int i=0,j=1;for(;p.length>-~++i;)j=(p[i-1]-p[i])*(p[i]-p[i+1])<0?j:0;return j;}
```
[Try it online!](https://tio.run/##rZO9coMwDMdn/BQacTEECEOpS/oEzZIxx@ASk5oSw4FJr8fRV6eCtHsTMkiyZPt/P/mjEGfhFoePMStF28KrULonAEob2eQik7Cd0rkAxka/T6GmHGsDQbcFDQmMtbvppxUq8VmRBDyvGpvXXin10bxv3G/HUZwWiV3vlRukLoaUPkzZPHaClD77L8WTzxtpukZDwYeRE1J3b6XKoDXCYDhX6gAnBLR3plH6iCSCEqsnlrX7ao08eVVnvBqnTKltLT/nbmzqac/M6YW@D9iahSwaKOWwWoFpOnmtRMwChrZEIkCG2e4iwsI7ySzlidnjZEtp1pMA7s9F2V4tsP5r41aBCE/CX8YQTk1cbuVWifmJ/Vq8rJ0Iaf7Bgv/aGsgw/gA "Java (JDK) – Try It Online")
Thanks to all in the comments for improvements - especially bit-shifting which I never would have thought of!!
[Answer]
# [R](https://www.r-project.org/), 34 bytes
```
all((d=diff(scan()))[1]*d*.5:-1>0)
```
[Try it online!](https://tio.run/##K/r/PzEnR0MjxTYlMy1Nozg5MU9DU1Mz2jBWK0VLz9RK19DOQPO/IZcxlxGXCdd/AA "R – Try It Online")
Alternately reverses signs of all differences, and then multiplies them all by first difference: mountain range sequences will all be positive
Would be 40 bytes if defined as a function instead, so apologies to Robin with whom this would tie without the `scan` for input. 
[Answer]
# [Scala](http://www.scala-lang.org/), 63 bytes
```
_.sliding(3).forall(t=>t(0)<t(1)&t(1)>t(2)|t(0)>t(1)&t(1)<t(2))
```
Checks whether for all sliding triplets the center is strictly larger (or strictly smaller) than the previous element and the next element.
[Try it online!](https://tio.run/##jZHRS8MwEMbf91ecZUgOwljbPbixDvRFfHDCRHwQkaxNt0pMZnMVpe5vr0nnxjaG@HAh/fHd1@8uNhVKNGb@KlOCW1NpEoWeCb2Q0@ptLksL8pOkzixcrlZQdzoAH0IBlRUtvyCBe/nOHIP2EvKYR3yAfEeGPOSu9kjoFG2dYjw6TY/UQ37hCx3CbaJcKHsiUMTjvdb4yGrgzPsHish3HMX4HcLV8KB34LTRLkQmcyBpieWVHnnF042mZ0gmcGWMkkLjCB50QS5j3ZpsdtjLTSlFumTWS1dloUlpZoNuXeTgvZhFhCA1ZemeKACprITgcXY3vQ7WYPT2Kbo2QGx92038bXv2D9/NQre2az9iO17z0rOqyAq9YDH63wilGCUTYn0cEwvx3B/uM8JvzyY7NvYMG7@vdfMD "Scala – Try It Online")
]