How many arrangements of the digits 1,2,3, ... ,9 have this property?

I counted the permutations satisfying the desired condition with a PARI-program. The result is

?

z=0;for(k=1,9!,x=numtoperm(9,k);gef=1;for(j=1,8,if(x[j+1]-x[j]>3,gef=0));if(ge f==1,z=z+1));print(z)

24576

But I have no idea how to use catalan-numbers to get this result.

Perhaps, it helps, that the factorization of the desired number is $2^{13}*3$

I generalized to permutations with 5,6,... elements and got the following result :

?

for(l=5,10,z=0;for(k=1,l!,x=numtoperm(l,k);gef=1;for(j=1,l-1,if(x[j+1]-x[j]>3, gef=0));if(gef==1,z=z+1));print(l," ",z," ",factor(z)))

5 96 [2, 5; 3, 1]

6 384 [2, 7; 3, 1]

7 1536 [2, 9; 3, 1]

8 6144 [2, 11; 3, 1]

9 24576 [2, 13; 3, 1]

10 98304 [2, 15; 3, 1]

So, the desired number seems to be $2^{2p-5}*3$ for permutations with p elements.


Let $a_n$ denote the number of valid configurations. Note that if $n\ge 4$, $a_{n+1}=4a_n$. $a_4=4!$, so $a_9=4! \cdot 4^5=\boxed{24576.}$