OFFSET
0,2
COMMENTS
Column 3 of A048790.
Sequence found by reading the line from 0, in the direction 0, 3, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. - Omar E. Pol, Sep 08 2011
a(n) is the sum of all perimeters of triangles having two sides of length n. For n=4 one has seven triangles with two sides of length 4 and the other of lengths 1..7. - J. M. Bergot, Mar 26 2014
a(n) is the Wiener index of the complete tripartite graph K_{n,n,n}. - Eric W. Weisstein, Sep 07 2017
Sequence found by reading the line from 0, in the direction 0, 3, ..., in a spiral on an equilateral triangular lattice. - Hans G. Oberlack, Dec 08 2018
REFERENCES
Dan Hoey, Bill Gosper and Richard C. Schroeppel, Discussions in Math-Fun Mailing list, circa Jul 13 1999.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Hans G. Oberlack, Triangle spiral.
R. C. Schroeppel, A few mathematical experiments, Experimental Mathematics Workshop, Oakland, California, March 30, 2004.
Eric Weisstein's World of Mathematics, Complete Tripartite Graph.
Eric Weisstein's World of Mathematics, Wiener Index.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 6*n^2 - 3*n = 3*n*(2*n-1) = 3*A000384(n). - Omar E. Pol, Dec 11 2008
a(n) = 12*n + a(n-1) - 9 with n > 0, a(0)=0. - Vincenzo Librandi, Nov 16 2010
G.f.: 3*x*(1+3*x)/(1-x)^3. - Bruno Berselli, Jan 21 2011
Sum_{n>0} 1/a(n) = (2/3)*log(2). - Enrique Pérez Herrero, Jun 04 2015
E.g.f.: 3*x*(1+2*x)*exp(x). - G. C. Greubel, Dec 07 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/6 - log(2)/3. - Amiram Eldar, Jan 10 2022
MAPLE
MATHEMATICA
CoefficientList[Series[3x(1+3x)/(1-x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 19 2013 *)
Table[3n(2n-1), {n, 0, 50}] (* or *) 3*PolygonalNumber[6, Range[0, 50]] (* or *) LinearRecurrence[{3, -3, 1}, {3, 18, 45}, {0, 50}] (* Eric W. Weisstein, Sep 07 2017 *)
PROG
(PARI) a(n)=3*n*(2*n-1) \\ Charles R Greathouse IV, Sep 24 2015
(Magma) [3*n*(2*n-1): n in [0..50]]; // G. C. Greubel, Dec 07 2018
(Sage) [3*n*(2*n-1) for n in range(50)] # G. C. Greubel, Dec 07 2018
(GAP) List([0..50], n -> 3*n*(2*n-1)); # G. C. Greubel, Dec 07 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 05 2004
EXTENSIONS
More terms from Vladimir Joseph Stephan Orlovsky, Nov 16 2008
Definition improved, offset corrected and edited by Omar E. Pol, Dec 11 2008
STATUS
approved