login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097073 Expansion of (1-x+2*x^2)/((1+x)*(1-2*x)). 25

%I #33 Aug 20 2022 08:50:52

%S 1,0,4,4,12,20,44,84,172,340,684,1364,2732,5460,10924,21844,43692,

%T 87380,174764,349524,699052,1398100,2796204,5592404,11184812,22369620,

%U 44739244,89478484,178956972,357913940,715827884,1431655764,2863311532

%N Expansion of (1-x+2*x^2)/((1+x)*(1-2*x)).

%C Partial sums are A097074.

%C Pairwise sums are {1, 1, 4, 16, 32, ...} or 2^n -Sum_{k=0..n} binomial(n,k)*(-1)^(n+k)*k.

%H Vincenzo Librandi, <a href="/A097073/b097073.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,2).

%F a(n) = (2*2^n + 4*(-1)^n)/3 - 0^n.

%F a(n) = A001045(n+1) + (-1)^n - 0^n.

%F a(n) = 2*A078008(n) - 0^n.

%F a(2*n+1) + a(2*n+2) = A000302(n+1). - _Paul Curtz_, Jun 30 2008

%F G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (4*k+5)*x - x*(4*k+1 + 2*x)/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 07 2013

%F E.g.f.: (1/3)*( 2*exp(2*x) + 4*exp(-x) - 3 ). - _G. C. Greubel_, Aug 19 2022

%t k=0;lst={1, k};Do[k=2^n-k;AppendTo[lst, k], {n, 2, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 11 2008 *)

%t CoefficientList[Series[(1-x+2x^2)/((1+x)(1-2x)),{x,0,40}],x] (* _Harvey P. Dale_, Dec 10 2012 *)

%o (Magma) [2*2^n/3+4*(-1)^n/3-0^n: n in [0..35]]; // _Vincenzo Librandi_, Aug 12 2011

%o (PARI) a(n)=([0,1; 2,1]^n*[1;0])[1,1] \\ _Charles R Greathouse IV_, Oct 03 2016

%o (SageMath)

%o def A097073(n): return 1 if (n==0) else 2*(2^n +2*(-1)^n)/3

%o [A097073(n) for n in (0..40)] # _G. C. Greubel_, Aug 19 2022

%Y Cf. A046055, A097074.

%Y Cf. A001045, A078008 (form a(n)=2^n-a(n-1)).

%K easy,nonn

%O 0,3

%A _Paul Barry_, Jul 22 2004

%E Obscure variable k in Orlovsky comment replaced with a(n) by _R. J. Mathar_, Apr 23 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:21 EDT 2024. Contains 371925 sequences. (Running on oeis4.)