A064694 Add column entries of the table with rows (1,2,0,0...), (0,3,4,5,0,0...), (0,0,6,7,8,9,0,0...), (0,0,0,10,11,12,13,14,0,0...), ...
1, 5, 10, 22, 34, 58, 80, 120, 155, 215, 266, 350, 420, 532, 624, 768, 885, 1065, 1210, 1430, 1606, 1870, 2080, 2392, 2639, 3003, 3290, 3710, 4040, 4520, 4896, 5440, 5865, 6477, 6954, 7638, 8170, 8930, 9520, 10360, 11011, 11935, 12650, 13662, 14444
Offset: 1
Examples
a(1)=1, a(2)=2+3=5, a(3)=4+6=10, a(4)=5+7+10=22.
Links
- Harry J. Smith, Table of n, a(n) for n=1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
Crossrefs
Cf. A007584.
Programs
-
Mathematica
Table[ Sum[ Binomial[n-k+1, 2] + k, {k, 0, Floor[n/2]}], {n, 1, 45}] (* Jean-François Alcover, Sep 16 2013 *) LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,5,10,22,34,58,80},50] (* Harvey P. Dale, Dec 11 2015 *)
-
PARI
{ for (n=1, 1000, a=sum(k=0, n\2, binomial(n - k + 1, 2) + k); write("b064694.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 22 2009
-
PARI
Vec(x*(2*x^2+4*x+1)/((x-1)^4*(x+1)^3) + O(x^100)) \\ Colin Barker, Feb 17 2015
Formula
a(2n-1) = n*(n+1)*(7*n-4)/6 (see A007584), a(2n) = n*(n+1)*(7*n+8)/6.
a(n) = sum{k=0..floor((n+1)/2), (n-k+1)ceiling((n-k+1)/2)+k+if(mod(n-k+1, 2) =0, ceiling((n-k+1)/2), 0)}. - Paul Barry, Aug 25 2004
a(n) = sum{k=0..floor(n/2), C(n-k+1,2)+k}; - Paul Barry, Jul 23 2008
a(n) = (2*n+1-(-1)^n)*(2*n+5-(-1)^n)*(14*n+15+17*(-1)^n)/384. - Luce ETIENNE, Feb 17 2015
From Colin Barker, Feb 17 2015: (Start)
a(n) = (7*n^3+30*n^2+32*n)/48 for n even.
a(n) = (7*n^3+27*n^2+17*n-3)/48 for n odd.
G.f.: x*(2*x^2+4*x+1) / ((x-1)^4*(x+1)^3).
(End)