cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A177522 Number of permutations of 1..n avoiding adjacent step pattern up, up, down, down.

This page as a plain text file.
%I A177522 #20 Apr 20 2022 09:03:37
%S A177522 1,1,2,6,24,114,648,4284,32256,273616,2578352,26725776,302273664,
%T A177522 3703441104,48865510848,690823736064,10417318281216,166907223390976,
%U A177522 2831507368842752,50703852290781696,955742450175919104,18916030525704006144,392213482250102734848
%N A177522 Number of permutations of 1..n avoiding adjacent step pattern up, up, down, down.
%H A177522 Alois P. Heinz, <a href="/A177522/b177522.txt">Table of n, a(n) for n = 0..454</a>
%F A177522 a(n) ~ c * d^n * n!, where d = 0.942475018599378010857210678432739023432859616925664352..., c = 1.284751954587372264742653082845227922651555734159194626... . - _Vaclav Kotesovec_, Aug 29 2014
%p A177522 b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
%p A177522       add(b(u+j-1, o-j, `if`(t in [0, 3], 1, 2)), j=1..o)+`if`(t<3,
%p A177522       add(b(u-j, o+j-1, `if`(t=2, 3, 0)), j=1..u), 0))
%p A177522     end:
%p A177522 a:= n-> b(n, 0, 0):
%p A177522 seq(a(n), n=0..30);  # _Alois P. Heinz_, Oct 07 2013
%t A177522 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
%t A177522      Sum[b[u+j-1, o-j, If[MemberQ[{0, 3}, t], 1, 2]], {j, 1, o}] + If[t<3,
%t A177522      Sum[b[u-j, o+j-1, If[t == 2, 3, 0]], {j, 1, u}], 0]];
%t A177522 a[n_] := b[n, 0, 0];
%t A177522 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Apr 20 2022, after _Alois P. Heinz_ *)
%Y A177522 Column k=12 of A242784.
%K A177522 nonn
%O A177522 0,3
%A A177522 _R. H. Hardin_, May 10 2010
%E A177522 a(17)-a(22) from _Alois P. Heinz_, Oct 07 2013
%E A177522 a(0)=1 from _Alois P. Heinz_, Apr 20 2022