login
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
0, 2, 0, 3, 2, 7, 10, 23, 42, 87, 170, 343, 682, 1367, 2730, 5463, 10922, 21847, 43690, 87383, 174762, 349527, 699050, 1398103, 2796202, 5592407, 11184810, 22369623, 44739242, 89478487, 178956970, 357913943, 715827882, 1431655767, 2863311530, 5726623063, 11453246122, 22906492247, 45812984490
OFFSET
0,2
COMMENTS
Partial sums of A155980 for n > 2. - Klaus Purath, Jan 30 2021
FORMULA
G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).
E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.
From Paul Curtz, Dec 20 2020: (Start)
a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).
a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).
a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).
a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).
a(n+4) = a(n+1) + 7*A001045(n).
a(n+4) + a(n+1) = A181565(n).
a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).
a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)
MAPLE
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);
MATHEMATICA
Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n, 40}]] (* G. C. Greubel, Oct 11 2016 *)
LinearRecurrence[{2, 1, -2}, {0, 2, 0, 3}, 40] (* Harvey P. Dale, Feb 13 2024 *)
PROG
(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
(PARI) a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ Michel Marcus, Oct 11 2016
(Sage) [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # G. C. Greubel, Sep 02 2019
(GAP) List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # G. C. Greubel, Sep 02 2019
CROSSREFS
Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.
Sequence in context: A345421 A348959 A007492 * A079451 A219187 A049799
KEYWORD
easy,nonn
AUTHOR
Miklos Kristof, Dec 07 2007
EXTENSIONS
First part of definition corrected by Klaus Brockhaus, Dec 05 2009
STATUS
approved