OFFSET
1,2
COMMENTS
Number of binary 3 X (n-1) matrices such that each row and column has at most one 1. - Dmitry Kamenetsky, Jan 20 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
R. J. Mathar, The number of binary matrices..., Table 1 column 3.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
Row sums of triangle A135858. Binomial transform of [1, 3, 6, 6, 0, 0, 0, ...].
G.f.: x*(1+3*x^2+2*x^3) / (1-x)^4. - R. J. Mathar, Apr 04 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 29 2012
a(n) = n^3 - 3*n^2 + 5*n - 2. - R. J. Mathar, Oct 20 2017
E.g.f.: 2 - (2 - 3*x - x^3)*exp(x). - G. C. Greubel, Aug 11 2022
EXAMPLE
a(3) = 13 = sum of row 3 terms of triangle A135858: (7, + 5 + 1).
a(4) = 34 = (1, 3, 3, 1) dot (1, 3, 6, 6) = (1 + 9 + 18 + 6).
MAPLE
seq(5*n - 2 + n^3 - 3*n^2, n=1..10^2); # Muniru A Asiru, Jan 24 2018
MATHEMATICA
CoefficientList[Series[(1+3*x^2+2*x^3)/(x-1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 29 2012 *)
PROG
(Magma) I:=[1, 4, 13, 34]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 29 2012
(GAP) List([1..10^4], n-> 5*n - 2 + n^3 - 3*n^2); # Muniru A Asiru, Jan 24 2018
(SageMath) [n^3 -3*n^2 +5*n -2 for n in (1..50)] # G. C. Greubel, Aug 11 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Dec 01 2007
STATUS
approved