%I #35 Feb 29 2024 07:09:23
%S 12,12,30,24,56,40,90,60,132,84,182,112,240,144,306,180,380,220,462,
%T 264,552,312,650,364,756,420,870,480,992,544,1122,612,1260,684,1406,
%U 760,1560,840,1722,924,1892,1012,2070,1104,2256,1200,2450,1300,2652
%N Longest perimeter of a Pythagorean triangle with n as length of one of the three sides.
%H Stefano Spezia, <a href="/A048759/b048759.txt">Table of n, a(n) for n = 3..10000</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F a(n) = n*A029578(n+2) = n+A055523(n)+A055524(n).
%F a(2*k) = 2*k*(k+1), a(2*k+1) = 2*(2*k+1)*(k+1).
%F a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - _Colin Barker_, Sep 13 2014
%F G.f.: -2*x^3*(2*x^5+x^4-6*x^3-3*x^2+6*x+6) / ((x-1)^3*(x+1)^3). - _Colin Barker_, Sep 13 2014
%F a(n) = (3*n^2+4*n-n^2*(-1)^n)/4. - _Luce ETIENNE_, Jul 18 2015
%F E.g.f.: x*((4 + x)*cosh(x) + (3 + 2*x)*sinh(x) - 4*(1 + x))/2. - _Stefano Spezia_, May 24 2021
%t A048759[n_] := (3 - (-1)^n)*n^2 / 4 + n; Array[A048759, 100, 3] (* or *)
%t LinearRecurrence[{0, 3, 0, -3, 0, 1}, {12, 12, 30, 24, 56, 40}, 100] (* _Paolo Xausa_, Feb 29 2024 *)
%o (PARI) Vec(-2*x^3*(2*x^5+x^4-6*x^3-3*x^2+6*x+6)/((x-1)^3*(x+1)^3) + O(x^100)) \\ _Colin Barker_, Sep 13 2014
%o (Magma) [(3*n^2+4*n-n^2*(-1)^n)/4: n in [3..60]]; // _Vincenzo Librandi_, Jul 19 2015
%Y Cf. A010814, A029578, A055522, A055523, A055524.
%K nonn,easy
%O 3,1
%A _Henry Bottomley_, Jun 15 2000