login
A257051
a(n) = cpg(n, 3) + cpg(n, 4) + ... + cpg(n, n) where cpg(n, m) is the m-th n-th-order centered polygonal number.
2
0, 0, 0, 10, 38, 98, 208, 390, 670, 1078, 1648, 2418, 3430, 4730, 6368, 8398, 10878, 13870, 17440, 21658, 26598, 32338, 38960, 46550, 55198, 64998, 76048, 88450, 102310, 117738, 134848, 153758, 174590, 197470, 222528, 249898, 279718, 312130, 347280, 385318
OFFSET
0,4
FORMULA
a(n) = (n^4-n^2-12)/6 for n>1.
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5) for n>6.
G.f.: 2*x^3*(x^3-4*x^2+6*x-5) / (x-1)^5.
EXAMPLE
a(4) = cpg(4, 3) + cpg(4, 4) = 13 + 25 = 38.
MATHEMATICA
CoefficientList[Series[2 x^3 (x^3 - 4 x^2 + 6 x - 5) / (x - 1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, Apr 15 2015 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 0, 0, 10, 38, 98, 208}, 40] (* Harvey P. Dale, Dec 26 2015 *)
PROG
(PARI) cpg(m, n) = m*n*(n-1)/2+1
vector(50, n, sum(m=3, n-1, cpg(n-1, m)))
(Magma) [0, 0] cat [(n^4-n^2-12)/6: n in [2..40]]; // Vincenzo Librandi, Apr 15 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Apr 15 2015
STATUS
approved