cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A131078 Periodic sequence (1, 1, 1, 1, 0, 0, 0, 0).

This page as a plain text file.
%I A131078 #44 Dec 09 2024 06:00:54
%S A131078 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,
%T A131078 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,
%U A131078 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
%N A131078 Periodic sequence (1, 1, 1, 1, 0, 0, 0, 0).
%H A131078 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,-1,1).
%F A131078 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).
%F A131078 G.f.: x/((1-x)*(1+x^4)).
%F A131078 a(n) = floor(((n+4) mod 8)/4). [_Gary Detlefs_, May 17 2011]
%F A131078 From _Wesley Ivan Hurt_, May 30 2015: (Start)
%F A131078 a(n) = a(n-1)-a(n-4)+a(n-5), n>5.
%F A131078 a(n) = (1+(-1)^((2*n+11-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8))/2. (End)
%F A131078 From _Ridouane Oudra_, Nov 17 2019: (Start)
%F A131078 a(n) = binomial(n+3,4) mod 2
%F A131078 a(n) = floor((n+3)/4) - 2*floor((n+3)/8). (End)
%o A131078 (PARI) {m=105; for(n=1, m, print1((n-1)%8<4, ","))}
%o A131078 (Magma) m:=105; [ [1, 1, 1, 1, 0, 0, 0, 0][ (n-1) mod 8 + 1 ]: n in [1..m] ];
%o A131078 (Magma) &cat[[1, 1, 1, 1, 0, 0, 0,0]: n in [0..10]]; // _Vincenzo Librandi_, May 31 2015
%o A131078 (Magma) [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
%o A131078 (Python)
%o A131078 def A131078(n): return int(not n-1&4) # _Chai Wah Wu_, Jan 31 2023
%Y A131078 Cf. A131074, A000035.
%Y A131078 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).
%K A131078 nonn,easy
%O A131078 1,1
%A A131078 _Klaus Brockhaus_, following a suggestion of _Paul Curtz_, Jun 14 2007