OFFSET
0,2
COMMENTS
Sequence found by reading the line from 0, in the direction 0, 2,..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. Opposite numbers to the members of A033580 in the same spiral. - Omar E. Pol, Sep 09 2011
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2*A000567(n) = 6*n^2 - 4*n = 2*n*(3*n - 2).
a(n) = a(n-1) + 12*n - 10, with n>0, a(0)=0. - Vincenzo Librandi, Aug 03 2010
G.f.: x*(2+10*x)/(1-3*x+3*x^2-x^3). - Colin Barker, Jan 06 2012
After 0, a(n) = Sum_{i=0..n-1} (12*i + 2). - Bruno Berselli, Sep 11 2013
E.g.f.: 2*x*(1 + 3*x)*exp(x). - G. C. Greubel, Sep 18 2019
MAPLE
seq(2*n*(3*n-2), n=0..50); # G. C. Greubel, Sep 18 2019
MATHEMATICA
Table[2*n*(3*n-2), {n, 0, 50}] (* G. C. Greubel, Jun 07 2017 *)
PROG
(PARI) a(n)=2*n*(3*n-2) \\ Charles R Greathouse IV, Oct 07 2015
(Magma) [2*n*(3*n-2): n in [0..50]]; // G. C. Greubel, Sep 18 2019
(Sage) [2*n*(3*n-2) for n in (0..50)] # G. C. Greubel, Sep 18 2019
(GAP) List([0..50], n-> 2*n*(3*n-2)); # G. C. Greubel, Sep 18 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, May 14 2008, May 19 2008
STATUS
approved