A134654 Duplicate of A038521.
0, 0, 2, 1, 4, 10, 12, 36, 64, 120, 272, 496, 1024, 2080, 4032, 8256, 16384, 32640, 65792, 130816, 262144, 524800, 1047552, 2098176, 4194304
Offset: 0
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.
0,seq(1/4*2^k-1/4*(-1-I)^k-1/4*(-1+I)^k,k=1..40); seq(coeff(convert(series((-x^3+x^2+x)/((1-2*x)*(1+2*x+2*x^2)),x,50),polynom),x,i),i=0..40); # C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004
LinearRecurrence[{0,2,4},{0,1,1,1},40] (* Harvey P. Dale, Mar 31 2020 *)
concat(0, Vec(x*(1 + x - x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Colin Barker, Aug 02 2019
I:=[1,0,1,3]; [m le 4 select I[m] else 2*Self(m-2)+4*Self(m-3):m in [1..33]]; // Marius A. Burtea, Aug 02 2019
Vec((1 - x^2 - x^3) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Aug 02 2019
LinearRecurrence[{0,2,4},{0,1,0,3},40] (* Harvey P. Dale, Oct 15 2017 *)
concat(0, Vec(x*(1 + x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Colin Barker, Aug 02 2019
A134142 := proc(n) (-4)^floor(n/4)*op(1+(n mod 4), [2,-3,2,2]) ; end: for n from 0 to 80 do printf("%d ",A134142(n)) ; od: # R. J. Mathar, Feb 05 2008
[n le 3 select Floor(n/2) else 2*Self(n-2)+4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, May 28 2015
f:= gfun:-rectoproc({a(n)=2*a(n-2)+4*a(n-3), a(0)=0,a(1)=1,a(2)=1},a(n),remember): seq(f(n),n=0..100); # Robert Israel, May 27 2015
Nest[Append[#, 2 #[[-2]] + 4 #[[-3]]] &, {0, 1, 1}, 15] (* Ivan Neretin, May 27 2015 *) CoefficientList[Series[x (1 + x)/((1 - 2 x) (2 x^2 + 2 x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, May 28 2015 *)
CoefficientList[Series[x*(-1 + x + x^2) / ( (2*x-1)*(2*x^2 + 2*x + 1) ),{x,0,38}],x] (* James C. McMahon, Apr 11 2025 *)
a:=[0,3,3]; [n le 3 select a[n] else 2*Self(n-2) + 4*Self(n-3):n in [1..35]]; // Marius A. Burtea, Jan 03 2020
R:=PowerSeriesRing(Integers(), 35); [0] cat Coefficients(R!( 3*x*(1 + x)/((1 - 2*x)*(1 + 2*x + 2*x^2)))); // Marius A. Burtea, Jan 03 2020
concat([0], Vec(3*(1 + x)/((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Andrew Howroyd, Jan 03 2020