login
A026960
a(n) = Sum_{k=0..n} (k+1) * A026615(n,k).
16
1, 3, 10, 30, 78, 189, 440, 999, 2230, 4917, 10740, 23283, 50162, 107505, 229360, 487407, 1032174, 2179053, 4587500, 9633771, 20185066, 42205161, 88080360, 183500775, 381681638, 792723429, 1644167140, 3405774819, 7046430690, 14562623457, 30064771040
OFFSET
0,2
FORMULA
For n>1, a(n) = 7*(n+2)*2^(n-3) - n - 2.
From Colin Barker, Feb 18 2016: (Start)
a(n) = 6*a(n-1)-13*a(n-2)+12*a(n-3)-4*a(n-4) for n>5
G.f.: (1-3*x+5*x^2-3*x^3-4*x^4+3*x^5) / ((1-x)^2*(1-2*x)^2).
(End)
MATHEMATICA
Join[{1, 3}, Table[7(n+2)2^(n-3)-n-2, {n, 2, 30}]] (* or *) LinearRecurrence[ {6, -13, 12, -4}, {1, 3, 10, 30, 78, 189}, 30] (* Harvey P. Dale, Oct 31 2015 *)
PROG
(PARI) Vec((1-3*x+5*x^2-3*x^3-4*x^4+3*x^5)/((1-x)^2*(1-2*x)^2) + O(x^40)) \\ Colin Barker, Feb 18 2016
(Magma) [n le 1 select 2*n+1 else 7*(n+2)*2^(n-3) - n - 2: n in [0..40]]; // G. C. Greubel, Jun 16 2024
(SageMath) [7*(n+2)*2^(n-3) - n - 2 + (5/4)*int(n==0) + (3/4)*int(n==1) for n in range(41)] # G. C. Greubel, Jun 16 2024
KEYWORD
nonn,easy
STATUS
approved