OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..3000
Leo Tavares, Illustration: Cropped Hexagons
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = A135370(2*n).
First differences: a(n+1) - a(n) = A016957(n).
From R. J. Mathar, Oct 24 2008: (Start)
G.f.: x*(3 + 4*x - x^2)/(1 - x)^3.
a(n) = A049451(n) - 1. (End)
E.g.f.: (3*x^2 + 4*x - 1)*exp(x) + 1. - G. C. Greubel, Jul 19 2017
a(n) = 1 + Sum_{i = n-1..2*n-1} 2*i. - Bruno Berselli, Feb 16 2018
a(n) = A003215(n) - (n+1)*2. - Leo Tavares, Jul 04 2021
MATHEMATICA
Table[3 n^2 + n - 1, {n, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {3, 13, 29}, 50] (* Harvey P. Dale, Sep 18 2016 *)
PROG
(Magma) [3*n^2+n-1: n in [1..50]]; // Vincenzo Librandi, May 06 2011
(PARI) a(n)=3*n^2+n-1 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 02 2008
EXTENSIONS
Edited by R. J. Mathar, Oct 24 2008
More terms from Vladimir Joseph Stephan Orlovsky, Mar 01 2009
STATUS
approved