OFFSET
1,1
COMMENTS
a(n) is the number of binary words with length <= n+1 which contain at least one 0 and one 1 and have at most one ascent. - Amelia Gibbs, May 21 2024
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Amelia Gibbs and Brian K. Miceli, Two Combinatorial Interpretations of Rascal Numbers, arXiv:2405.11045 [math.CO], 2024.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = binomial(n+3, n-1) + binomial(n+1, n-1).
G.f.: x*(2-2*x+x^2)/(1-x)^5. - Colin Barker, Mar 19 2012
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Vincenzo Librandi, Apr 27 2012
a(n) = sum_{k=1..n} sum{j=1..k} sum{i=1..j} (i + binomial(j,k)). - Wesley Ivan Hurt, Nov 01 2014
E.g.f.: (1/24)*x*(x^3+12*x^2+48*x+48)*exp(x). - Robert Israel, Nov 02 2014
a(n) = Sum_{i=1..n+1} Sum_{j=1...i-1} A077028(i,j). - Amelia Gibbs, May 21 2024
MAPLE
MATHEMATICA
Table[1/24*n*(n+1)*(n^2+5*n+18), {n, 60}] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
CoefficientList[Series[(2-2*x+x^2)/(1-x)^5, {x, 0, 50}], x] (* Vincenzo Librandi, Apr 27 2012 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {2, 8, 21, 45, 85}, 50] (* Harvey P. Dale, Jan 02 2024 *)
PROG
(PARI) a(n)=binomial(n+3, 4)+binomial(n+1, 2) \\ Charles R Greathouse IV, Mar 19 2012
(Magma) I:=[2, 8, 21, 45, 85]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Apr 27 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 07 1999
STATUS
approved