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!)
A135351 a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n. 5

%I #68 Feb 13 2024 19:12:15

%S 0,2,0,3,2,7,10,23,42,87,170,343,682,1367,2730,5463,10922,21847,43690,

%T 87383,174762,349527,699050,1398103,2796202,5592407,11184810,22369623,

%U 44739242,89478487,178956970,357913943,715827882,1431655767,2863311530,5726623063,11453246122,22906492247,45812984490

%N a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n.

%C Partial sums of A155980 for n > 2. - _Klaus Purath_, Jan 30 2021

%H G. C. Greubel, <a href="/A135351/b135351.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).

%F E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.

%F From _Paul Curtz_, Dec 20 2020: (Start)

%F a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).

%F a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).

%F a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).

%F a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).

%F a(n+4) = a(n+1) + 7*A001045(n).

%F a(n+4) + a(n+1) = A181565(n).

%F a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).

%F a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)

%p G(x):=x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)): f[0]:=G(x): for n from 1 to 30 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/n!,n=0..30);

%t Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n,40}]] (* _G. C. Greubel_, Oct 11 2016 *)

%t LinearRecurrence[{2,1,-2},{0,2,0,3},40] (* _Harvey P. Dale_, Feb 13 2024 *)

%o (Magma) a135351:=func< n | (2^n+3-7*(-1)^n+3*0^n)/6 >; [ a135351(n): n in [0..32] ]; // _Klaus Brockhaus_, Dec 05 2009

%o (PARI) a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ _Michel Marcus_, Oct 11 2016

%o (Sage) [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # _G. C. Greubel_, Sep 02 2019

%o (GAP) List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # _G. C. Greubel_, Sep 02 2019

%Y Cf. A005578, A099754.

%Y Cf. A001045, A327767, A328284.

%Y Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.

%K easy,nonn

%O 0,2

%A _Miklos Kristof_, Dec 07 2007

%E First part of definition corrected by _Klaus Brockhaus_, Dec 05 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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)