login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A195062 Period 7: repeat [1, 0, 1, 0, 1, 0, 1]. 1

%I

%S 1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,

%T 1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,

%U 0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1

%N Period 7: repeat [1, 0, 1, 0, 1, 0, 1].

%C First differs from A115788 at a(113).

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1).

%F From _Hieronymus Fischer_, Apr 30 2012: (Start)

%F a(n) = (1+(-1)^((n-1) mod 7))/2.

%F a(n) = 1-((n-1) mod 7) mod 2.

%F G.f.: x*(1-x^8)/((1-x^2)*(1-x^7)).

%F Also: x*(1+x^2)*(1+x^4)/(1-x^7). (End)

%F From _Wesley Ivan Hurt_, Jul 11 2016: (Start)

%F a(n) = a(n-7) for n>7.

%F a(n) = 1 - Sum_{k=1..6} floor((n + k - 1)/7)*(-1)^k. (End)

%p a:= n-> [1, 0, 1, 0, 1, 0, 1][1+irem(n+6, 7)]:

%p seq(a(n), n=1..150); # _Alois P. Heinz_, Jan 22 2012

%t PadRight[{},130,{1,0,1,0,1,0,1}] (* _Harvey P. Dale_, Feb 14 2015 *)

%t Table[Boole@ Or[OddQ@ #, # == 0] &@ Mod[n, 7], {n, 120}] (* or *)

%t Rest@ CoefficientList[Series[x (1 - x^8)/((1 - x^2) (1 - x^7)), {x, 0, 120}], x] (* or *)

%t Table[1 - Sum[Floor[(n + k - 1)/7] (-1)^k, {k, 6} ], {n, 120}] (* _Michael De Vlieger_, Jul 13 2016 *)

%o &cat [[1, 0, 1, 0, 1, 0, 1]^^20]; // _Wesley Ivan Hurt_, Jul 11 2016

%o (PARI) a(n)=1-(n-1)%7%2 \\ _Charles R Greathouse IV_, Jul 13 2016

%Y Cf. A115788.

%K nonn,easy

%O 1

%A _Omar E. Pol_, Jan 22 2012

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 June 16 21:49 EDT 2021. Contains 345080 sequences. (Running on oeis4.)