A007518 a(n) = floor(n*(n+2)*(2*n-1)/8).
0, 3, 9, 21, 39, 66, 102, 150, 210, 285, 375, 483, 609, 756, 924, 1116, 1332, 1575, 1845, 2145, 2475, 2838, 3234, 3666, 4134, 4641, 5187, 5775, 6405, 7080, 7800, 8568, 9384, 10251, 11169, 12141, 13167, 14250, 15390, 16590, 17850, 19173, 20559, 22011, 23529, 25116, 26772, 28500, 30300
Offset: 1
References
- From a problem on p. 151 of J. Rec. Math., 7 (1975).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (3, -2, -2, 3, -1).
Crossrefs
Column 4 of triangle A094953.
Programs
-
GAP
List([1..50],n->Int(n*(n+2)*(2*n-1)/8)); # Muniru A Asiru, Mar 22 2018
-
Magma
[Floor(n*(n+2)(2*n-1)/8): n in [1..50]]; // G. C. Greubel, Mar 21 2018
-
Maple
[seq(floor(n*(n+2)*(2*n-1)/8),n=1..50)]; # Muniru A Asiru, Mar 22 2018
-
Mathematica
Table[Floor[(n(n+2)(2n-1))/8],{n,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,3,9,21,39},40] (* Harvey P. Dale, Oct 06 2014 *)
-
PARI
vector(50, n, n*(n+2)*(2*n-1)\8) \\ Michel Marcus, Oct 12 2014
Formula
a(n) = 3*A002623(n) for n>0. - M. F. Hasler, Sep 15 2009
G.f.: 3*x/((x+1)*(x-1)^4). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009]
a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5) with a(1)=0, a(2)=3, a(3)=9, a(4)=21, a(5)=39. - Harvey P. Dale, Oct 06 2014
Extensions
Offset corrected by Harvey P. Dale, Oct 06 2014
Terms a(40) onward added by G. C. Greubel, Mar 21 2018