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.
%I A000382 M4087 N1696 #41 Apr 13 2022 13:25:14 %S A000382 6,11,20,36,65,119,218,400,735,1351,2484,4568,8401,15451,28418,52268, %T A000382 96135,176819,325220,598172,1100209,2023599,3721978,6845784,12591359, %U A000382 23159119,42596260,78346736,144102113,265045107,487493954 %N A000382 Restricted permutations. %C A000382 The fourth column of A008305, divided by 4. %D A000382 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A000382 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A000382 Vincenzo Librandi, <a href="/A000382/b000382.txt">Table of n, a(n) for n = 4..1000</a> %H A000382 N. S. Mendelsohn, <a href="http://dx.doi.org/10.4153/CMB-1961-005-4">Permutations with confined displacement</a>, Canad. Math. Bull., 4 (1961), 29-38. %H A000382 Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009. %H A000382 Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992 %F A000382 a(n) = a(n-1)+a(n-2)+a(n-3)-2 (conjectured). %p A000382 A000382:=-(-6+z+2*z**2+4*z**3+z**4)/(z-1)/(z**3+z**2+z-1); [Conjectured by _Simon Plouffe_ in his 1992 dissertation.] %p A000382 a:= n-> if n<4 then 0 elif n=4 then 6 else (Matrix([[11,7,4,2]]). Matrix(4, (i,j)-> if (i=j-1) then 1 elif j=1 then [2,0,0,-1][i] else 0 fi)^(n-2))[1,4] fi: seq(a(n), n=4..30); # _Alois P. Heinz_, Aug 26 2008 %t A000382 a[n_] := Which[n<4, 0, n == 4, 6, True, {11, 7, 4, 2}.MatrixPower[Table[Which[i == j-1, 1, j == 1, {2, 0, 0, -1}[[i]], True, 0], {i, 1, 4}, {j, 1, 4}], n-2] // Last]; Table[a[n], {n, 4, 27}] (* _Jean-François Alcover_, Mar 12 2014, after _Alois P. Heinz_ *) %Y A000382 Cf. A008305, A000496 divided by 4, A020992. %K A000382 nonn,easy %O A000382 4,1 %A A000382 _N. J. A. Sloane_ %E A000382 More terms from _Vincenzo Librandi_, Mar 14 2014