A159693 Partial sums of A000463.
1, 2, 4, 8, 11, 20, 24, 40, 45, 70, 76, 112, 119, 168, 176, 240, 249, 330, 340, 440, 451, 572, 584, 728, 741, 910, 924, 1120, 1135, 1360, 1376, 1632, 1649, 1938, 1956, 2280, 2299, 2660, 2680, 3080, 3101, 3542, 3564, 4048, 4071, 4600, 4624, 5200, 5225, 5850
Offset: 1
Keywords
Examples
For n=9, a(n) = 1+1+2+4+3+9+4+16+5 = 45.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
Programs
-
Haskell
a159693 n = a159693_list !! (n-1) a159693_list = scanl1 (+) a000463_list -- Reinhard Zumkeller, Nov 08 2015
-
Magma
S:=&cat[ [ n, n^2 ]: n in [1..25] ]; [ n eq 1 select S[1] else Self(n-1)+S[n]: n in [1..#S] ]; // Klaus Brockhaus, Apr 20 2009
-
Maple
seq((2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48, n=1..100); # Robert Israel, Dec 30 2014
-
Mathematica
CoefficientList[Series[x*(1+x-x^2+x^3)/((1+x)^3*(x-1)^4), {x, 0, 50}], x] (* or *) Table[(2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48, {n,0,50}] (* G. C. Greubel, Jun 02 2018 *) Accumulate[Flatten[{#,#^2}&/@Range[30]]] (* Harvey P. Dale, Nov 30 2019 *)
Formula
a(n) = (n^3+3*n^2+8*n+r(n))/24, where r(n) = 3*n+9 if n is odd, 3*n^2 if n is even.
G.f.: x*(1+x-x^2+x^3)/((1+x)^3*(x-1)^4). - R. J. Mathar, Apr 20 2009
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7). - R. J. Mathar, Apr 20 2009
a(n) = (2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48. - Luce ETIENNE, Dec 29 2014
E.g.f.: (2*x^3+15*x^2+30*x+9)*exp(x)/48 +(x^2-3)*exp(-x)/16. - Robert Israel, Dec 30 2014
Extensions
More terms from R. J. Mathar and Klaus Brockhaus, Apr 20 2009
Comments