%I #91 Sep 08 2022 08:45:13
%S 0,3,18,45,84,135,198,273,360,459,570,693,828,975,1134,1305,1488,1683,
%T 1890,2109,2340,2583,2838,3105,3384,3675,3978,4293,4620,4959,5310,
%U 5673,6048,6435,6834,7245,7668,8103,8550,9009,9480,9963,10458,10965,11484
%N 3 times hexagonal numbers: a(n) = 3*n*(2*n-1).
%C Column 3 of A048790.
%C 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
%C 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
%C a(n) is the Wiener index of the complete tripartite graph K_{n,n,n}. - _Eric W. Weisstein_, Sep 07 2017
%C 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
%D Dan Hoey, Bill Gosper and Richard C. Schroeppel, Discussions in Math-Fun Mailing list, circa Jul 13 1999.
%H Vincenzo Librandi, <a href="/A094159/b094159.txt">Table of n, a(n) for n = 0..1000</a>
%H Hans G. Oberlack, <a href="/A094159/a094159.png">Triangle spiral</a>.
%H R. C. Schroeppel, <a href="http://www.experimentalmath.info/workshop2004/schroeppel-talk.pdf">A few mathematical experiments</a>, Experimental Mathematics Workshop, Oakland, California, March 30, 2004.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CompleteTripartiteGraph.html">Complete Tripartite Graph</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WienerIndex.html">Wiener Index</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 6*n^2 - 3*n = 3*n*(2*n-1) = 3*A000384(n). - _Omar E. Pol_, Dec 11 2008
%F a(n) = 12*n + a(n-1) - 9 with n > 0, a(0)=0. - _Vincenzo Librandi_, Nov 16 2010
%F G.f.: 3*x*(1+3*x)/(1-x)^3. - _Bruno Berselli_, Jan 21 2011
%F Sum_{n>0} 1/a(n) = (2/3)*log(2). - _Enrique PĂ©rez Herrero_, Jun 04 2015
%F E.g.f.: 3*x*(1+2*x)*exp(x). - _G. C. Greubel_, Dec 07 2018
%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/6 - log(2)/3. - _Amiram Eldar_, Jan 10 2022
%p A094159:=n->3*n*(2*n-1); seq(A094159(n), n=0..40); # _Wesley Ivan Hurt_, Mar 28 2014
%t CoefficientList[Series[3x(1+3x)/(1-x)^3, {x, 0, 50}], x] (* _Vincenzo Librandi_, Jun 19 2013 *)
%t 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 *)
%o (PARI) a(n)=3*n*(2*n-1) \\ _Charles R Greathouse IV_, Sep 24 2015
%o (Magma) [3*n*(2*n-1): n in [0..50]]; // _G. C. Greubel_, Dec 07 2018
%o (Sage) [3*n*(2*n-1) for n in range(50)] # _G. C. Greubel_, Dec 07 2018
%o (GAP) List([0..50], n -> 3*n*(2*n-1)); # _G. C. Greubel_, Dec 07 2018
%Y Cf. A000384, A048790.
%Y 3 times n-gonal numbers: A045943, A033428, A062741, A152773, A152751, A152759, A152767, A153783, A153448, A153875.
%Y Essentially a bisection of A045943. - _Omar E. Pol_, Sep 17 2011
%Y Cf. numbers of the form n*(n*k-k+6))/2, this sequence is the case k=12: see Comments lines of A226492.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_, May 05 2004
%E More terms from _Vladimir Joseph Stephan Orlovsky_, Nov 16 2008
%E Definition improved, offset corrected and edited by _Omar E. Pol_, Dec 11 2008
|