OFFSET
1,1
COMMENTS
The first row of the array is the sum of 3 consecutive triangular numbers = A000217(n) + A000217(n+1) + A000217(n+2) = Centered triangular numbers: 3*n*(n-1)/2 + 1, for n>1. The second row of the array is the sum of 3 consecutive squares = Number of points on surface of square pyramid: 3*n^2 + 2 (n>1). The first column of the array is k+1 = 4, 5, 6, 7, 8, 9, ... The second column of the array is A016825 = 4*n + 2 (for n>2). The third column of the array is A017377 = 10*n + 9 (for n>0).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Polygonal Number
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = A[n+2,n] = P(k+2,n) + P(k+2,n+1) + P(k+2,n+2) where P(k,n) = k*((n-2)*k - (n-4))/2.
a(n) = n*(3*n^2-3*n+8)/2. G.f.: x*(4-2*x+7*x^2)/(1-x)^4. [Colin Barker, Apr 30 2012]
a(1)=4, a(2)=14, a(3)=39, a(4)=88, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Aug 15 2012
EXAMPLE
The array begins:
k / A[k,n]
3.|.4.10.19.31..46..64..85.109.136.166....=A005448(n+1).
4.|.5.14.29..50..77.110.149.194.245.302...=A005918(n).
5.|.6.18.39..69.108.156.213.279.354.438...=A129863(n).
6.|.7.22.49..88.139.202.277.364.463.574...
7.|.8.26.59.107.170.248.341.449.572.710...
8.|.9.30.69.126.201.294.405.534.681.846...
MAPLE
P := proc(k, n) n*((k-2)*n-k+4)/2 ; end: A := proc(k, n) add( P(k, i), i=n..n+2) ; end: A130423 := proc(n) A(n+3, n) ; end: seq(A130423(n), n=0..40) ; # R. J. Mathar, Jun 14 2007
MATHEMATICA
CoefficientList[Series[(4-2*x+7*x^2)/(1-x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 28 2012 *)
Table[n (3n^2-3n+8)/2, {n, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {4, 14, 39, 88}, 40] (* Harvey P. Dale, Aug 15 2012 *)
PROG
(Magma) I:=[4, 14, 39, 88]; [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..40]]; // Vincenzo Librandi, Jun 28 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 26 2007
EXTENSIONS
More terms from R. J. Mathar, Jun 14 2007
STATUS
approved