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 A099783 #11 Sep 08 2022 08:45:15 %S A099783 1,3,9,30,108,405,1548,5967,23085,89451,346842,1345248,5218263, %T A099783 20242872,78528609,304640595,1181814705,4584708702,17785841652, %U A099783 68998115709,267670245492,1038395956527,4028337876861,15627474388899,60624993311226 %N A099783 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k)*3^(n-2*k). %C A099783 In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3). %H A099783 G. C. Greubel, <a href="/A099783/b099783.txt">Table of n, a(n) for n = 0..1000</a> %H A099783 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-9,3). %F A099783 G.f.: (1-3*x)/((1-3*x)^2 - 3*x^3). %F A099783 a(n) = 6*a(n-1) - 9*a(n-2) + 3*a(n-3). %p A099783 seq(coeff(series((1-3*x)/((1-3*x)^2 - 3*x^3), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Sep 04 2019 %t A099783 LinearRecurrence[{6,-9,3}, {1,3,9}, 30] (* _G. C. Greubel_, Sep 04 2019 *) %o A099783 (PARI) my(x='x+O('x^30)); Vec((1-3*x)/((1-3*x)^2 - 3*x^3)) \\ _G. C. Greubel_, Sep 04 2019 %o A099783 (Magma) I:=[1,3,9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 3*Self(n-3): n in [1..30]]; // _G. C. Greubel_, Sep 04 2019 %o A099783 (Sage) %o A099783 def A099783_list(prec): %o A099783 P.<x> = PowerSeriesRing(ZZ, prec) %o A099783 return P((1-3*x)/((1-3*x)^2 - 3*x^3)).list() %o A099783 A099783_list(30) # _G. C. Greubel_, Sep 04 2019 %o A099783 (GAP) a:=[1,3,9];; for n in [4..30] do a[n]:=6*a[n-1]-9*a[n-2]+3*a[n-3]; od; a; # _G. C. Greubel_, Sep 04 2019 %Y A099783 Cf. A099780, A099781, A099782, A099784, A099785, A099786, A099787. %K A099783 easy,nonn %O A099783 0,2 %A A099783 _Paul Barry_, Oct 26 2004