Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Apr 17 2022 08:21:25
%S 3,12,24,39,57,78,102,129,159,192,228,267,309,354,402,453,507,564,624,
%T 687,753,822,894,969,1047,1128,1212,1299,1389,1482,1578,1677,1779,
%U 1884,1992,2103,2217,2334,2454,2577,2703,2832,2964,3099,3237,3378,3522,3669,3819,3972,4128
%N a(n) = 3*(n^2+n-4)/2.
%C Also the number of chords in the n-triangular grid graph for n >=2.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphChord.html">Graph Chord</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TriangularGridGraph.html">Triangular Grid Graph</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-1).
%F G.f.: 3*x^2*(-1 - x + x^2)/(-1 + x)^3.
%F Sum_{n>=2} 1/a(n) = 2*Pi*tan(sqrt(17)*Pi/2)/(3*sqrt(17)) + 1/2. - _Amiram Eldar_, Apr 17 2022
%t Table[3 (n^2 + n - 4)/2, {n, 2, 20}]
%t LinearRecurrence[{3, -3, 1}, {3, 12, 24}, 20]
%t CoefficientList[Series[3 (-1 - x + x^2)/(-1 + x)^3, {x, 0, 20}], x]
%o (PARI) a(n) = 3*(n^2+n-4)/2 \\ _Felix Fröhlich_, Jan 03 2018
%o (PARI) Vec(3*x^2*(x^2-x-1)/(x-1)^3 + O(x^40)) \\ _Felix Fröhlich_, Jan 03 2018
%K nonn,easy
%O 2,1
%A _Eric W. Weisstein_, Jan 03 2018