login
A297675
a(n) = 3*(n^2+n-4)/2.
0
3, 12, 24, 39, 57, 78, 102, 129, 159, 192, 228, 267, 309, 354, 402, 453, 507, 564, 624, 687, 753, 822, 894, 969, 1047, 1128, 1212, 1299, 1389, 1482, 1578, 1677, 1779, 1884, 1992, 2103, 2217, 2334, 2454, 2577, 2703, 2832, 2964, 3099, 3237, 3378, 3522, 3669, 3819, 3972, 4128
OFFSET
2,1
COMMENTS
Also the number of chords in the n-triangular grid graph for n >=2.
LINKS
Eric Weisstein's World of Mathematics, Graph Chord.
Eric Weisstein's World of Mathematics, Triangular Grid Graph.
FORMULA
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-1).
G.f.: 3*x^2*(-1 - x + x^2)/(-1 + x)^3.
Sum_{n>=2} 1/a(n) = 2*Pi*tan(sqrt(17)*Pi/2)/(3*sqrt(17)) + 1/2. - Amiram Eldar, Apr 17 2022
MATHEMATICA
Table[3 (n^2 + n - 4)/2, {n, 2, 20}]
LinearRecurrence[{3, -3, 1}, {3, 12, 24}, 20]
CoefficientList[Series[3 (-1 - x + x^2)/(-1 + x)^3, {x, 0, 20}], x]
PROG
(PARI) a(n) = 3*(n^2+n-4)/2 \\ Felix Fröhlich, Jan 03 2018
(PARI) Vec(3*x^2*(x^2-x-1)/(x-1)^3 + O(x^40)) \\ Felix Fröhlich, Jan 03 2018
CROSSREFS
Sequence in context: A012469 A103449 A030571 * A112236 A050180 A319422
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Jan 03 2018
STATUS
approved