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!)
A131078 Periodic sequence (1, 1, 1, 1, 0, 0, 0, 0). 11
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
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.: x/((1-x)*(1+x^4)).
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
(Python)
def A131078(n): return int(not n-1&4) # Chai Wah Wu, Jan 31 2023
CROSSREFS
Period 2*k: repeat k ones followed by k zeros: A000035(n+1) (k=1), A133872(n) (k=2), A088911 (k=3), this sequence (k=4), and A112713(n-1) (k=5).
Sequence in context: A359942 A266434 A025447 * A302203 A130657 A347871
KEYWORD
nonn,easy
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 09:32 EDT 2024. Contains 371268 sequences. (Running on oeis4.)