OFFSET
0,3
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
N. S. Mendelsohn, Permutations with confined displacement, Canad. Math. Bull., 4 (1961), 29-38.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
MAPLE
A000496:=-4*(-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
a:= n-> if n<4 then 0 elif n=4 then 24 else (Matrix([[8, 12, 4, 0]]). Matrix(4, (i, j)-> if (i=j-1) then 1 elif j=1 then [2, 0, 0, -1][i] else 0 fi)^n)[1, 3] fi: seq (a(n), n=4..40); # Alois P. Heinz, Aug 26 2008
MATHEMATICA
a[n_] := Switch[n, 0, 1, 1, 1, 2, 2, 3, 6, 4, 24, _, ({8, 12, 4, 0} . MatrixPower[Table[Which[i == j-1, 1, j == 1, {2, 0, 0, -1}[[i]], True, 0], {i, 1, 4}, {j, 1, 4}], n])[[3]]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 12 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved