A081489 a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3).
1, 3, 8, 18, 35, 61, 98, 148, 213, 295, 396, 518, 663, 833, 1030, 1256, 1513, 1803, 2128, 2490, 2891, 3333, 3818, 4348, 4925, 5551, 6228, 6958, 7743, 8585, 9486, 10448, 11473, 12563, 13720, 14946, 16243, 17613, 19058, 20580, 22181, 23863, 25628
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Jerrold W. Grossman and Serge Kruk, Solution to Problem 11901 in The American Mathematical Monthly, 2016
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Programs
-
GAP
List([1..50], n-> n*(2*n^2-3*n+7)/6); # G. C. Greubel, Aug 13 2019
-
Magma
I:=[1,3,8,18]; [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..50]]; // Vincenzo Librandi, Feb 28 2014
-
Maple
with(combinat):a:=n->sum(fibonacci(3,i), i=0..n): seq(a(n), n=0..42); # Zerinvary Lajos, Mar 20 2008
-
Mathematica
Table[n*(2*n^2-3*n+7)/6, {n,50}] (* Vladimir Joseph Stephan Orlovsky, Nov 07 2008, modified by G. C. Greubel, Aug 13 2019 *) LinearRecurrence[{4,-6,4,-1},{1,3,8,18},50] (* Harvey P. Dale, Aug 07 2025 *)
-
PARI
my(x='x+O(x^50)); Vec(serlaplace(exp(x)*(x+x^2/2+x^3/3)))
-
Python
def A081489(n): return n*(n*((n<<1)-3)+7)//6 # Chai Wah Wu, Nov 05 2024
-
Sage
[n*(2*n^2-3*n+7)/6 for n in (1..50)] # G. C. Greubel, Aug 13 2019
Formula
a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3). - Paul Barry, Jul 03 2003
E.g.f.: exp(x)*(x +x^2/2 +x^3/3).
O.g.f.: x*(1-x+2*x^2)/(1-x)^4. - Colin Barker, Jul 28 2012
a(n) = 2*n + Sum_{i=1..n} (i^2 - 2*i). - Wesley Ivan Hurt, Feb 25 2014
Extensions
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003
New name, using the formulas of Paul Barry, Joerg Arndt, Feb 28 2014
Comments