cp's OEIS Frontend

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.

A099780 a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k) * 2^k*3^(n-3*k).

This page as a plain text file.
%I A099780 #26 Sep 08 2022 08:45:15
%S A099780 1,3,9,29,99,351,1273,4677,17307,64295,239361,892125,3327091,12412143,
%T A099780 46313289,172824629,644952459,2406919671,8982595153,33523198797,
%U A099780 125109675747,466914455615,1742546049561,6503265548325,24270507755131,90578748694983,338044453470369
%N A099780 a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k) * 2^k*3^(n-3*k).
%C A099780 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 A099780 Colin Barker, <a href="/A099780/b099780.txt">Table of n, a(n) for n = 0..1000</a>
%H A099780 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-9,2).
%F A099780 G.f.: (1-3*x)/((1-3*x)^2 - 2*x^3).
%F A099780 a(n) = 6*a(n-1) - 9*a(n-2) + 2*a(n-3).
%F A099780 a(n) = A001834(n)/3 + 2^(n+1)/3. - _R. J. Mathar_, Sep 21 2012
%F A099780 a(n) = (2^(2+n) - (2-sqrt(3))^n*(-1+sqrt(3)) + (1+sqrt(3))*(2+sqrt(3))^n) / 6. - _Colin Barker_, Feb 05 2017
%F A099780 E.g.f.: (1/3)*exp(2*x)*(2 + cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - _Stefano Spezia_, Sep 04 2019
%p A099780 seq(coeff(series((1-3*x)/((1-3*x)^2 -2*x^3), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Sep 04 2019
%t A099780 LinearRecurrence[{6,-9,2},{1,3,9},30] (* _Harvey P. Dale_, Nov 30 2015 *)
%o A099780 (PARI) Vec((1-3*x) / ((1-3*x)^2-2*x^3) + O(x^30)) \\ _Colin Barker_, Feb 05 2017
%o A099780 (PARI) a(n) = sum(k=0, n\3, binomial(n-k, 2*k) * 2^k*3^(n-3*k)); \\ _Michel Marcus_, Feb 05 2017
%o A099780 (Magma) I:=[1,3,9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 2*Self(n-3): n in [1..30]]; // _G. C. Greubel_, Sep 04 2019
%o A099780 (Sage)
%o A099780 def A099780_list(prec):
%o A099780     P.<x> = PowerSeriesRing(ZZ, prec)
%o A099780     return P((1-3*x)/((1-3*x)^2 -2*x^3)).list()
%o A099780 A099780_list(30) # _G. C. Greubel_, Sep 04 2019
%o A099780 (GAP) a:=[1,3,9];; for n in [4..30] do a[n]:=6*a[n-1]-9*a[n-2]+2*a[n-3]; od; a; # _G. C. Greubel_, Sep 04 2019
%Y A099780 Cf. A001834, A099215.
%K A099780 easy,nonn
%O A099780 0,2
%A A099780 _Paul Barry_, Oct 26 2004