%I #47 Dec 03 2024 15:10:51
%S 2,6,20,60,182,546,1640,4920,14762,44286,132860,398580,1195742,
%T 3587226,10761680,32285040,96855122,290565366,871696100,2615088300,
%U 7845264902,23535794706,70607384120,211822152360,635466457082,1906399371246
%N Numbers n such that A081249(m)/m^2 has a local maximum for m = n.
%C The limit of the local maxima, lim A081249(n)/n^2 = 1/6. For local minima cf. A081250.
%C Also the number of different 4- and 3-colorings for the vertices of all triangulated planar polygons on a base with n+2 vertices, if the colors of the two base vertices are fixed. - _Patrick Labarque_, Mar 23 2010
%C From _Toby Gottfried_, Apr 18 2010: (Start)
%C a(n) = the number of ternary sequences of length n+1 where the numbers of (0's, 1's) are both odd.
%C A015518 covers the (odd, even) and (even, odd) cases, and A122983 covers (even, even). (End)
%H Vincenzo Librandi, <a href="/A081251/b081251.txt">Table of n, a(n) for n = 1..1000</a>
%H Klaus Brockhaus, <a href="/A081134/a081134.gif">Illustration for A081134, A081249, A081250 and A081251</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-3).
%F G.f.: 2/((1-x)*(1+x)*(1-3*x)).
%F a(n) = a(n-2) + 2*3^(n) for n > 1.
%F a(n+2) - a(n) = A008776(n).
%F a(n) = 2*A033113(n+1).
%F a(2*n+1) = A054880(n+1).
%F a(n) = floor(3^(n+1)/4). - _Mircea Merca_, Dec 26 2010
%F From _G. C. Greubel_, Jul 14 2019: (Start)
%F a(n) = (9*3^(n-1) -(-1)^n -2)/4.
%F E.g.f.: (3*exp(3*x) - 2*exp(x) - exp(-x))/4. (End)
%e 6 is a term since A081249(5)/5^2 = 4/25 = 0.160, A081249(6)/6^2 = 7/36 = 0.194, A081249(7)/7^2 = 9/49 = 0.184.
%p seq(floor(3^(n+1)/4), n=1..30). # _Mircea Merca_, Dec 27 2010
%t a[n_]:= Floor[3^(n+1)/4]; Array[a, 30]
%t Table[(9*3^(n-1) -(-1)^n -2)/4, {n, 1, 30}] (* _G. C. Greubel_, Jul 14 2019 *)
%o (Magma) [Floor(3^(n+1)/4) : n in [1..30]]; // _Vincenzo Librandi_, Jun 25 2011
%o (PARI) vector(30, n, (9*3^(n-1) -(-1)^n -2)/4) \\ _G. C. Greubel_, Jul 14 2019
%o (Sage) [(9*3^(n-1) -(-1)^n -2)/4 for n in (1..30)] # _G. C. Greubel_, Jul 14 2019
%o (GAP) List([1..30], n-> (9*3^(n-1) -(-1)^n -2)/4); # _G. C. Greubel_, Jul 14 2019
%Y Cf. A008776, A033113, A054880, A081134, A081249, A081250.
%K nonn
%O 1,1
%A _Klaus Brockhaus_, Mar 17 2003