Number of permutations p on the set [n] with the properties that abs(p(i)-i) <= 3 for all i and p(1) <= 3.

A002527

Number of permutations p on the set [n] with the properties that abs(p(i)-i) <= 3 for all i and p(1) <= 3.

Terms

    a(0) =0a(1) =1a(2) =2a(3) =6a(4) =18a(5) =60a(6) =184a(7) =560a(8) =1695a(9) =5200a(10) =15956a(11) =48916a(12) =149664a(13) =458048a(14) =1402360a(15) =4294417a(16) =13149210a(17) =40259178a(18) =123260854a(19) =377395940a(20) =1155508592a(21) =3537919648a(22) =10832298239a(23) =33165996032a(24) =101546731816a(25) =310913195800a(26) =951945967120

External references