Is this a staircase number? Challenge :

Check if the given number forms a number staircase or not



Input :

A integer (greater than 0 and not decimal). NOTE : You can take input as string , array of digits.



Output :

a truthy / falsy value depending on whether the number forms a staircase or not



Number staircase :

A number staircase is an integer that , when read from left to right : 


Starts with 1
which may be followed by 2 
which may be followed by 3
and so on till n
then the number descends starting at n - 1
then n - 2
then n - 3
and so on till it reaches 1


Note :

The may be part is used to indicate that if length > is greater than 1. If it is the order must be followed as is. i.e : 12321



Example :

12321                          ---&gt; true
12345654321                    ---&gt; true
9                              ---&gt; false
1                              ---&gt; true
2                              ---&gt; false
123421                         ---&gt; false
112312318901323                ---&gt; false
123456789101110987654321       ---&gt; true




Note :

The input given will always be an integer greater than 0 and will not be a decimal. Your output must be a truthy or falsy value depending on the input



Restrictions :

This is code-golf so shortest code in bytes (for each programming language ) wins.
R, 97 bytes



function(n)"if"(n&gt;1,{while({T=T+1;x=paste(c(1:T,T:2-1),collapse="");nchar(x)&lt;nchar(n)})0;x==n},T)


Try it online!

Takes n as a character or an integer; using character will give correct results for integers that can't be held precisely as a 64-bit double.

Generates staircase numbers until it finds one at least as long as n is, then tests for equality.

Equivalent to:

function(n)
    if(n > 1){
        T &lt;- T + 1
        x &lt;- paste(c(1:T,T:2-1),collapse="")
        while(nchar(x) &lt; nchar(n)){
            T &lt;- T + 1
            x &lt;- paste(c(1:T,T:2-1),collapse="")
        }
        return(x == n)
    } else
        return(TRUE)