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!)
A097072 Expansion of (1 - 2*x + 2*x^2)/((1 - x^2)*(1 - 2*x)). 4
1, 0, 3, 4, 11, 20, 43, 84, 171, 340, 683, 1364, 2731, 5460, 10923, 21844, 43691, 87380, 174763, 349524, 699051, 1398100, 2796203, 5592404, 11184811, 22369620, 44739243, 89478484, 178956971, 357913940, 715827883, 1431655764, 2863311531, 5726623060, 11453246123 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = (4*2^n - 3 + 5*(-1)^n)/6.
a(n) = Sum_{k=0..n} (2^k - 1 + 0^k)(-1)^(n-k).
a(n) = A001045(n+1) - A000035(n).
a(n) = a(n-1) + 2*a(n-2) + 1, n > 1. - Gary Detlefs, Jun 20 2010
a(2*n) = A007583(n), a(2*n+1) = A080674(n), n >= 0. - Yosu Yurramendi, Feb 21 2017
a(n) = A000975(n) + (-1)^n. - Alois P. Heinz, Jun 15 2023
MAPLE
a:= n-> ceil(2*(2^n-1)/3)+(-1)^n:
seq(a(n), n=0..32); # Alois P. Heinz, Jun 15 2023
MATHEMATICA
CoefficientList[Series[(1-2x+2x^2)/((1-x^2)(1-2x)), {x, 0, 50}], x] (* Harvey P. Dale, Mar 09 2011 *)
Table[2*2^n/3 - 1/2 + 5 (-1)^n/6, {n, 0, 32}] (* Michael De Vlieger, Feb 22 2017 *)
PROG
(PARI) for(n=0, 50, print1((4*2^n - 3 + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Oct 10 2017
(Magma) [(4*2^n - 3 + 5*(-1)^n)/6: n in [0..50]]; // G. C. Greubel, Oct 10 2017
CROSSREFS
Sequence in context: A222770 A036652 A295962 * A049977 A000677 A110865
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 22 2004
STATUS
approved

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 18 21:51 EDT 2024. Contains 371781 sequences. (Running on oeis4.)