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 A099787 #11 Sep 08 2022 08:45:15 %S A099787 1,3,9,27,83,267,909,3267,12235,46983,182529,711099,2764619,10704147, %T A099787 41257341,158371011,605932099,2312728095,8812918161,33549513579, %U A099787 127652354627,485608571547,1847326271949,7028217617859,26742885359131 %N A099787 a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * 2^k * 3^(n-4*k). %C A099787 In general a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * u^k * v^(n-4*k) has g.f. (1-v*x)^2/((1-v*x)^3 - u*x^4) and satisfies the recurrence a(n) = 3*v*a(n-1) - 3*v^2*a(n-2) + v^3*a(n-3) + u*a(n-4). %H A099787 G. C. Greubel, <a href="/A099787/b099787.txt">Table of n, a(n) for n = 0..1000</a> %H A099787 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (9,-27,27,2). %F A099787 G.f.: (1-3*x)^2/((1-3*x)^3 - 2*x^4). %F A099787 a(n) = 9*a(n-1) - 27*a(n-2) + 27*a(n-3) + 2*a(n-4). %p A099787 seq(coeff(series((1-3*x)^2/((1-3*x)^3 - 2*x^4), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Sep 04 2019 %t A099787 LinearRecurrence[{9,-27,27,2}, {1,3,9,27}, 30] (* _G. C. Greubel_, Sep 04 2019 *) %o A099787 (PARI) my(x='x+O('x^30)); Vec((1-3*x)^2/((1-3*x)^3 - 2*x^4)) \\ _G. C. Greubel_, Sep 04 2019 %o A099787 (Magma) I:=[1,3,9,27]; [n le 4 select I[n] else 9*Self(n-1) - 27*Self(n-2) + 27*Self(n-3) + 2*Self(n-4): n in [1..30]]; // _G. C. Greubel_, Sep 04 2019 %o A099787 (Sage) %o A099787 def A099787_list(prec): %o A099787 P.<x> = PowerSeriesRing(ZZ, prec) %o A099787 return P((1-3*x)^2/((1-3*x)^3 - 2*x^4)).list() %o A099787 A099787_list(30) # _G. C. Greubel_, Sep 04 2019 %o A099787 (GAP) a:=[1,3,9,27];; for n in [5..30] do a[n]:=9*a[n-1]-27*a[n-2] + 27*a[n-3] +2*a[n-4]; od; a; # _G. C. Greubel_, Sep 04 2019 %Y A099787 Cf. A099780, A099781, A099783, A099784, A099785, A099786. %K A099787 easy,nonn %O A099787 0,2 %A A099787 _Paul Barry_, Oct 26 2004