This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A099583 #19 Jul 23 2022 03:27:33 %S A099583 0,0,1,2,10,26,91,260,820,2420,7381,22022,66430,198926,597871,1792520, %T A099583 5380840,16139240,48427561,145272842,435848050,1307514626,3922632451, %U A099583 11767808780,35303692060,105910810460,317733228541,953198888462 %N A099583 a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k-1)*2^(n-k-1)*(3/2)^(k-1). %C A099583 In general, a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k-1)*u^(n-k-1)*(v/u)^(k-1) has g.f. x^2/((1-v*x^2)(1-u*x-v*x^2)) and satisfies the recurrence a(n) = u*a(n-1) + 2v*a(n-2) - u*v*a(n-3) - v^2*a(n-4). %H A099583 G. C. Greubel, <a href="/A099583/b099583.txt">Table of n, a(n) for n = 0..1000</a> %H A099583 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,6,-6,-9). %F A099583 G.f.: x^2/((1-3*x^2)*(1-2*x-3*x^2)). %F A099583 a(n) = 2*a(n-1) + 6*a(n-2) - 6*a(n-3) - 9*a(n-4). %F A099583 a(n) = A002452(n/2) if n even; a(n) = 2*A006100((n+1)/2) if n odd. - _R. J. Mathar_, Jun 06 2010 %F A099583 a(0)=0, a(1)=0; a(2)=1; a(n) = 2*a(n-1) + 3*a(n-2) if n is odd; a(n) = 2*a(n-1) + 3*a(n-2) + 3^m (m=1,2,3...) if n is even. - _Vincenzo Librandi_, Jun 26 2010 %F A099583 From _G. C. Greubel_, Jul 22 2022: (Start) %F A099583 a(n) = (1/8)*(3^n - (-1)^n - 2*(1-(-1)^n)*3^((n-1)/2) ). %F A099583 E.g.f.: (1/12)*(3*exp(x)*sinh(2*x) - 2*sqrt(3)*sinh(sqrt(3)*x)). (End) %t A099583 LinearRecurrence[{2,6,-6,-9}, {0,0,1,2}, 40] (* _G. C. Greubel_, Jul 22 2022 *) %o A099583 (PARI) a(n) = sum(k=0, n\2, binomial(n-k, k-1)*2^(n-k-1)*(3/2)^(k-1)); \\ _Michel Marcus_, Jan 20 2018 %o A099583 (Magma) I:=[0,0,1,2]; [n le 4 select I[n] else 2*Self(n-1) +6*Self(n-2) -6*Self(n-3) -9*Self(n-4): n in [1..41]]; // _G. C. Greubel_, Jul 22 2022 %o A099583 (SageMath) [(1/8)*(3^n -(-1)^n -2*(1-(-1)^n)*3^((n-1)/2)) for n in (0..40)] # _G. C. Greubel_, Jul 22 2022 %Y A099583 Cf. A006100, A002452. %K A099583 easy,nonn %O A099583 0,4 %A A099583 _Paul Barry_, Oct 23 2004