OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Leo Tavares, Illustration: Truncated Point Hexagons
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = a(n-1)+6*n, a(1)=1.
From G. C. Greubel, Apr 26 2016: (Start)
G.f.: (5 - 16*x + 5*x^2)/(-1 + x)^3.
E.g.f.: (-5 + 6*x + 3*x^2)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n) = A003215(n) - 6. - Leo Tavares, Jul 05 2021
Sum_{n>=0} 1/a(n) = Pi*tan(sqrt(23/3)*Pi/2)/sqrt(69). - Vaclav Kotesovec, Jul 06 2021
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {1, 13, 31}, 50] (* G. C. Greubel, Apr 26 2016 *)
Table[3 n^2 + 3 n - 5, {n, 45}] (* or *)
Rest@ CoefficientList[Series[(5 - 16 x + 5 x^2)/(-1 + x)^3, {x, 0, 45}], x] (* Michael De Vlieger, Apr 27 2016 *)
PROG
(Magma) [-5+3*n^2+3*n: n in [1..50]].
(PARI) a(n)=3*n*(n+1)-5 \\ Charles R Greathouse IV, Jan 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Oct 08 2009
EXTENSIONS
New name from Charles R Greathouse IV, Jan 11 2012
STATUS
approved