A129109 Sums of three consecutive hexagonal numbers.
7, 22, 49, 88, 139, 202, 277, 364, 463, 574, 697, 832, 979, 1138, 1309, 1492, 1687, 1894, 2113, 2344, 2587, 2842, 3109, 3388, 3679, 3982, 4297, 4624, 4963, 5314, 5677, 6052, 6439, 6838, 7249, 7672, 8107, 8554, 9013, 9484, 9967, 10462, 10969, 11488, 12019, 12562
Offset: 0
Examples
a(0) = H(0) + H(1) + H(2) = 0 + 1 + 6 = 7 = 6*0^2 + 9*0 + 7. a(1) = H(1) + H(2) + H(3) = 1 + 6 + 15 = 22 = 6*1^2 + 9*1 + 7. a(2) = H(2) + H(3) + H(4) = 6 + 15 + 28 = 49 = 6*2^2 + 9*2 + 7.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
I:=[7,22,49]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
-
Mathematica
LinearRecurrence[{3,-3,1},{7,22,49},50] (* Vincenzo Librandi, Feb 20 2012 *) Total/@Partition[PolygonalNumber[6,Range[0,50]],3,1] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 14 2020 *)
-
PARI
a(n)=6*n^2+9*n+7 \\ Charles R Greathouse IV, Feb 20 2012
Formula
a(n) = H(n) + H(n+1) + H(n+2) where H(n) = A000384(n) = n*(2*n-1).
a(n) = 6*n^2 + 9*n + 7.
From Colin Barker, Feb 20 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (7 + x + 4*x^2)/(1-x)^3. (End)
E.g.f.: (7 + 15*x + 6*x^2)*exp(x). - Elmo R. Oliveira, Nov 16 2024
Comments