OFFSET
0,3
COMMENTS
A sign-restricted matrix is such that each partial column sum, starting from row 1, equals 0 or 1, and each partial row sum, starting from column 1, is nonnegative.
LINKS
Richard A. Brualdi and Geir Dahl, Sign-restricted matrices of 0's, 1's, and -1's, arXiv:2101.04150 [math.CO], 2021.
Index entries for linear recurrences with constant coefficients, signature (3,-4,4,-3,1).
FORMULA
a(n) = (3*n^2-n)/4 if (n==0) or (n==3) (mod 4);
a(n) = (3*n^2-n+2)/4 if (n==1) or (n==2) (mod 4).
From Stefano Spezia, Jan 14 2021: (Start)
G.f.: x*(1 + x^2 + x^3)/((1 - x)^3*(1 + x^2)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n > 4. (End)
For n >= 4, a(n) = (A225231(n+1) + 1)/2 - 1. - Hugo Pfoertner, Jan 17 2021
MATHEMATICA
LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 3, 6, 11}, 50] (* Amiram Eldar, Jan 14 2021 *)
PROG
(PARI) a(n) = my(x=n % 4); if ((x==0) || (x==3), (3*n^2-n)/4, (3*n^2-n+2)/4);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, Jan 14 2021
STATUS
approved