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.

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

This page as a plain text file.
%I A099785 #12 Sep 08 2022 08:45:15
%S A099785 1,2,4,8,18,48,144,448,1380,4152,12224,35456,102024,292768,840416,
%T A099785 2416384,6959504,20069280,57913536,167158656,482462752,1392319488,
%U A099785 4017460224,11590946816,33439639616,96470796672,278311599616
%N A099785 a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * 2^(n-3*k).
%C A099785 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 A099785 G. C. Greubel, <a href="/A099785/b099785.txt">Table of n, a(n) for n = 0..1000</a>
%H A099785 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6,-12,8,2).
%F A099785 G.f.: (1-2*x)^2/((1-2*x)^3 - 2*x^4).
%F A099785 a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3) + 2*a(n-4).
%p A099785 seq(coeff(series((1-2*x)^2/((1-2*x)^3 - 2*x^4), x, n+1), x, n), n = 0 .. 40); # _G. C. Greubel_, Sep 04 2019
%t A099785 Table[Sum[Binomial[n-k,3k]2^(n-3k),{k,0,Floor[n/4]}],{n,0,30}] (* or *) LinearRecurrence[{6,-12,8,2},{1,2,4,8},30] (* _Harvey P. Dale_, Apr 01 2012 *)
%o A099785 (PARI) my(x='x+O('x^30)); Vec((1-2*x)^2/((1-2*x)^3 - 2*x^4)) \\ _G. C. Greubel_, Sep 04 2019
%o A099785 (Magma) I:=[1,2,4,8]; [n le 4 select I[n] else 6*Self(n-1) - 12*Self(n-2) + 8*Self(n-3) + 2*Self(n-4): n in [1..30]]; // _G. C. Greubel_, Sep 04 2019
%o A099785 (Sage)
%o A099785 def A099785_list(prec):
%o A099785     P.<x> = PowerSeriesRing(ZZ, prec)
%o A099785     return P((1-2*x)^2/((1-2*x)^3 - 2*x^4)).list()
%o A099785 A099785_list(30) # _G. C. Greubel_, Sep 04 2019
%o A099785 (GAP) a:=[1,2,4,8];; for n in [5..30] do a[n]:=6*a[n-1] -12*a[n-2] + 8*a[n-3] +2*a[n-4]; od; a; # _G. C. Greubel_, Sep 04 2019
%Y A099785 Cf. A003522, A097119.
%Y A099785 Cf. A099780, A099781, A099783, A099784, A099785, A099786, A099787.
%K A099785 easy,nonn
%O A099785 0,2
%A A099785 _Paul Barry_, Oct 26 2004