A024862 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n-k+1), where k = floor(n/2), s = natural numbers, t = odd natural numbers.
3, 5, 17, 23, 50, 62, 110, 130, 205, 235, 343, 385, 532, 588, 780, 852, 1095, 1185, 1485, 1595, 1958, 2090, 2522, 2678, 3185, 3367, 3955, 4165, 4840, 5080, 5848, 6120, 6987, 7293, 8265, 8607, 9690, 10070, 11270, 11690, 13013, 13475, 14927, 15433, 17020, 17572, 19300
Offset: 2
Links
- Vincenzo Librandi, Table of n, a(n) for n = 2..1000
- Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
Crossrefs
Cf. A058187.
Programs
-
Magma
[((2*n-1)*(2*n+1)*(2*n+3) +3*(-1)^n*(n^2+(n+1)^2))/48: n in [2..50]]; // G. C. Greubel, Apr 19 2023
-
Mathematica
CoefficientList[Series[(3+2x+3x^2)/((1+x)^3 (1-x)^4), {x,0,50}], x] (* Vincenzo Librandi, Sep 25 2013 *)
-
PARI
Vec(x^2*(3+2*x+3*x^2)/((1+x)^3*(x-1)^4) + O(x^100)) \\ Colin Barker, Jan 29 2016
-
SageMath
[((2*n-1)*(2*n+1)*(2*n+3) +3*(-1)^n*(n^2+(n+1)^2))/48 for n in range(2,51)] # G. C. Greubel, Apr 19 2023
Formula
G.f.: x^2*(3+2*x+3*x^2) / ((1+x)^3*(x-1)^4). - R. J. Mathar, Sep 25 2013
From Colin Barker, Jan 29 2016: (Start)
a(n) = (8*n^3 + 6*(-1)^n*n^2 + 12*n^2 + 6*(-1)^n*n - 2*n + 3*(-1)^n - 3)/48.
a(n) = (4*n^3 + 9*n^2 + 2*n)/24 for n even.
a(n) = (4*n^3 + 3*n^2 - 4*n - 3)/24 for n odd. (End)
E.g.f.: (1/48)*(3*(1 - 4*x + 2*x^2)*exp(-x) + (-3 + 18*x + 36*x^2 + 8*x^3)*exp(x)). - G. C. Greubel, Apr 19 2023