A103145 a(n) = (1/6)*(n^3 + 21*n^2 + 74*n + 18).
3, 19, 43, 76, 119, 173, 239, 318, 411, 519, 643, 784, 943, 1121, 1319, 1538, 1779, 2043, 2331, 2644, 2983, 3349, 3743, 4166, 4619, 5103, 5619, 6168, 6751, 7369, 8023, 8714, 9443, 10211, 11019, 11868, 12759, 13693, 14671, 15694, 16763
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Programs
-
Magma
I:=[3, 19, 43, 76]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..45]]; // Vincenzo Librandi, Jun 26 2012
-
Mathematica
CoefficientList[Series[(3-2*x)*(1+3*x-3*x^2)/(1-x)^4,{x,0,40}],x] (* or *) LinearRecurrence[ {4,-6,4,-1},{3,19,43,76},50] (* Vincenzo Librandi, Jun 26 2012 *) Table[(n^3+21n^2+74n+18)/6,{n,0,50}] (* Harvey P. Dale, Jun 18 2024 *)
-
PARI
a(n) = (n^3+21*n^2+74*n+18)/6; \\ Altug Alkan, Sep 23 2018
-
Python
def A103145(n): return (n*(n*(n+21)+74)+18)//6 # Chai Wah Wu, Mar 07 2024
Formula
a(n) = 2*A051936(n+4)_4 + A051937(n+4)_4 (for n = 0, 1, 2, 3) or a(m) = (1/6)*(m^3 + 9m^2 - 46m - 6) = 2*A051936(m) + A051937(m) (for m = 4, 5, 6).
G.f.: (3-2*x)*(1 + 3*x - 3*x^2)/(1-x)^4. - Colin Barker, Apr 30 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 26 2012
Comments