login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181586 a(0)=0; a(n+1) = 2*a(n) + period 4:repeat 0,1,-2,1. 2
0, 0, 1, 0, 1, 2, 5, 8, 17, 34, 69, 136, 273, 546, 1093, 2184, 4369, 8738, 17477, 34952, 69905, 139810, 279621, 559240, 1118481, 2236962, 4473925, 8947848, 17895697, 35791394, 71582789, 143165576, 286331153, 572662306, 1145324613, 2290649224 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

(**) See A115451, A139763, A139800, A139806, A139814.

a(n) + a(n+1) + a(n+2) + a(n+3) = 2^n.

LINKS

Table of n, a(n) for n=0..35.

Index entries for linear recurrences with constant coefficients, signature (1,1,1,2).

FORMULA

a(n) = a(n-4) + 2^(n-4).

a(n) = -a(n-2) + A078008(n).

a(n) = a(n-2) + A118405(n-2) unsigned.

a(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) (**).

G.f. x^2*(-1+x) / ( (2*x-1)*(1+x)*(x^2+1) ). - R. J. Mathar, Feb 06 2011

EXAMPLE

a(1)=2*a(0)+0=0, a(2)=2*a(1)+1=0+1=1, a(3)=2*a(2)-2=2-2=0, a(4)=2*a(3)+1=0+1=1, a(5)=2*a(4)+0=2+0=2, a(6)=2*a(5)+1=4+1=5.

MAPLE

a:= proc(n) option remember;

      `if`(n=0, 0, 2*a(n-1) +[0, 1, -2, 1][irem(n-1, 4)+1])

    end:

seq(a(n), n=0..40); # Alois P. Heinz, Jan 30 2011

MATHEMATICA

LinearRecurrence[{1, 1, 1, 2}, {0, 0, 1, 0}, 40] (* Jean-Fran├žois Alcover, May 18 2018 *)

CROSSREFS

Cf. A180343.

Sequence in context: A162216 A032158 A103745 * A112361 A050872 A086324

Adjacent sequences:  A181583 A181584 A181585 * A181587 A181588 A181589

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Jan 30 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 11:44 EDT 2019. Contains 325254 sequences. (Running on oeis4.)