%I #36 May 07 2024 16:37:42
%S 1,3,6,15,24,33,42,51,60,69,78,87,96,105,114,123,132,141,150,159,168,
%T 177,186,195,204,213,222,231,240,249,258,267,276,285,294,303,312,321,
%U 330,339,348,357,366,375,384,393,402
%N a(0) = 1, a(1) = 3, a(2) = 6 and a(n) = 2*a(n-1) - a(n-2) for n > 3.
%C Apart from the second term, the same as A122709. - _R. J. Mathar_, Jul 30 2010
%C For n > 1, a(n) is the maximum value of the sum of the vertices in a normal magic triangle of order n (see formula 10 in Trotter). - _Stefano Spezia_, Mar 03 2021
%H Harvey P. Dale, <a href="/A179805/b179805.txt">Table of n, a(n) for n = 0..1000</a>
%H Terrel Trotter, <a href="https://www.trottermath.net/simpleops/magictri.html">Normal Magic Triangles of Order n</a>, Journal of Recreational Mathematics Vol. 5, No. 1, 1972, pp. 28-32.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).
%F (1 + 3*x + 6*x^2 + 15*x^3 + ...) = (1 + 3*x^2 + 3*x^3 + 3*x^4 + ...) * (1 + 3*x + 3*x^2 + 3*x^3 + 3*x^4 + ...).
%F a(0) = 1, a(1) = 3, a(2) = 6 and a(n) = 2*a(n-1) - a(n-2) for n > 3.
%F a(n) = a(n-1) + 9 for n > 2.
%F For n > 1, a(n) == 6 (mod 9).
%F From _Colin Barker_, Oct 28 2012: (Start)
%F a(n) = 9*n - 12 for n > 1.
%F G.f.: (2*x+1)*(3*x^2-x+1)/(x-1)^2. (End)
%F E.g.f.: 13 + 6*x + 3*exp(x)*(3x - 4). - _Stefano Spezia_, Mar 03 2021
%e a(4) = 24 = 9 + a(3) = 9 + 15.
%e a(4) = 24 = 2*a(3) - a(2) = 2*15 - 6.
%t LinearRecurrence[{2,-1},{1,3,6,15},50] (* _Harvey P. Dale_, Sep 25 2018 *)
%Y Cf. A122709.
%K nonn,easy
%O 0,2
%A _Gary W. Adamson_, Jul 27 2010