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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131078 Periodic sequence (1, 1, 1, 1, 0, 0, 0, 0). 10
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..105.

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

FORMULA

a(1) = a(2) = a(3) = a(4) = 1, a(5) = a(6) = a(7) = a(8) = 0; for n > 8, a(n) = a(n-8).

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

a(n) = 1/56*{-6*(n mod 8)+[(n+1) mod 8]+[(n+2) mod 8]+[(n+3) mod 8]+8*[(n+4) mod 8]+[(n+5) mod 8]+[(n+6) mod 8]+[(n+7) mod 8]}, with n>=0. - Paolo P. Lava, Jun 19 2007

a(n) = floor(((n+4) mod 8)/4). [Gary Detlefs, May 17 2011]

From Wesley Ivan Hurt, May 30 2015: (Start)

a(n) = a(n-1)-a(n-4)+a(n-5), n>5.

a(n) = (1+(-1)^((2*n+11-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8))/2. (End)

From Ridouane Oudra, Nov 17 2019: (Start)

a(n) = binomial(n+3,4) mod 2

a(n) = floor((n+3)/4) - 2*floor((n+3)/8). (End)

PROG

(PARI) {m=105; for(n=1, m, print1((n-1)%8<4, ", "))}

(MAGMA) m:=105; [ [1, 1, 1, 1, 0, 0, 0, 0][ (n-1) mod 8 + 1 ]: n in [1..m] ];

(MAGMA) &cat[[1, 1, 1, 1, 0, 0, 0, 0]: n in [0..10]];

/* or */ [Floor((1+(-1)^((2*n+11-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8))/2): n in [1..60]]; // Vincenzo Librandi, May 31 2015

CROSSREFS

Cf. A131074, A000035.

Period 2*k: repeat k ones followed by k zeros: A000035(n+1) (k=1), A133872(n) (k=2), A088911 (k=3), A131078(n) (k=4), and A112713(n-1) (k=5).

Sequence in context: A267871 A266434 A025447 * A302203 A130657 A185916

Adjacent sequences:  A131075 A131076 A131077 * A131079 A131080 A131081

KEYWORD

nonn,easy,changed

AUTHOR

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

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 November 18 10:08 EST 2019. Contains 329261 sequences. (Running on oeis4.)