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 A340648 #14 Jan 17 2021 13:59:32 %S A340648 0,1,3,6,11,18,26,35,46,59,73,88,105,124,144,165,188,213,239,266,295, %T A340648 326,358,391,426,463,501,540,581,624,668,713,760,809,859,910,963,1018, %U A340648 1074,1131,1190,1251,1313,1376,1441,1508,1576,1645,1716,1789,1863,1938,2015 %N A340648 a(n) is the maximum number of nonzero entries in an n X n sign-restricted matrix. %C A340648 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. %H A340648 Richard A. Brualdi and Geir Dahl, <a href="https://arxiv.org/abs/2101.04150">Sign-restricted matrices of 0's, 1's, and -1's</a>, arXiv:2101.04150 [math.CO], 2021. %H A340648 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,4,-3,1). %F A340648 a(n) = (3*n^2-n)/4 if (n==0) or (n==3) (mod 4); %F A340648 a(n) = (3*n^2-n+2)/4 if (n==1) or (n==2) (mod 4). %F A340648 From _Stefano Spezia_, Jan 14 2021: (Start) %F A340648 G.f.: x*(1 + x^2 + x^3)/((1 - x)^3*(1 + x^2)). %F A340648 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) %F A340648 For n >= 4, a(n) = (A225231(n+1) + 1)/2 - 1. - _Hugo Pfoertner_, Jan 17 2021 %t A340648 LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 3, 6, 11}, 50] (* _Amiram Eldar_, Jan 14 2021 *) %o A340648 (PARI) a(n) = my(x=n % 4); if ((x==0) || (x==3), (3*n^2-n)/4, (3*n^2-n+2)/4); %Y A340648 Cf. A225231. %K A340648 nonn,easy %O A340648 0,3 %A A340648 _Michel Marcus_, Jan 14 2021