login
a(n) = n*(n+1)*(n^2+5*n+18)/24.
5

%I #46 May 25 2024 14:40:57

%S 2,8,21,45,85,147,238,366,540,770,1067,1443,1911,2485,3180,4012,4998,

%T 6156,7505,9065,10857,12903,15226,17850,20800,24102,27783,31871,36395,

%U 41385,46872,52888,59466,66640,74445,82917,92093,102011,112710,124230,136612

%N a(n) = n*(n+1)*(n^2+5*n+18)/24.

%C 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

%H Vincenzo Librandi, <a href="/A051744/b051744.txt">Table of n, a(n) for n = 1..1000</a>

%H Amelia Gibbs and Brian K. Miceli, <a href="https://arxiv.org/abs/2405.11045">Two Combinatorial Interpretations of Rascal Numbers</a>, arXiv:2405.11045 [math.CO], 2024.

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).

%F a(n) = binomial(n+3, n-1) + binomial(n+1, n-1).

%F G.f.: x*(2-2*x+x^2)/(1-x)^5. - _Colin Barker_, Mar 19 2012

%F 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

%F a(n) = sum_{k=1..n} sum{j=1..k} sum{i=1..j} (i + binomial(j,k)). - _Wesley Ivan Hurt_, Nov 01 2014

%F E.g.f.: (1/24)*x*(x^3+12*x^2+48*x+48)*exp(x). - _Robert Israel_, Nov 02 2014

%F a(n) = Sum_{i=1..n+1} Sum_{j=1...i-1} A077028(i,j). - _Amelia Gibbs_, May 21 2024

%p A051744:=n->n*(n+1)*(n^2+5*n+18)/24: seq(A051744(n), n=1..50); # _Wesley Ivan Hurt_, Nov 01 2014

%t Table[1/24*n*(n+1)*(n^2+5*n+18),{n,60}] (* _Vladimir Joseph Stephan Orlovsky_, Jan 28 2012 *)

%t CoefficientList[Series[(2-2*x+x^2)/(1-x)^5,{x,0,50}],x] (* _Vincenzo Librandi_, Apr 27 2012 *)

%t LinearRecurrence[{5,-10,10,-5,1},{2,8,21,45,85},50] (* _Harvey P. Dale_, Jan 02 2024 *)

%o (PARI) a(n)=binomial(n+3,4)+binomial(n+1,2) \\ _Charles R Greathouse IV_, Mar 19 2012

%o (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

%K nonn,easy

%O 1,1

%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 07 1999