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!)
A195062 Period 7: repeat [1, 0, 1, 0, 1, 0, 1]. 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, 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, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
First differs from A115788 at a(113).
LINKS
FORMULA
From Hieronymus Fischer, Apr 30 2012: (Start)
a(n) = (1+(-1)^((n-1) mod 7))/2.
a(n) = 1-((n-1) mod 7) mod 2.
G.f.: x*(1-x^8)/((1-x^2)*(1-x^7)).
Also: x*(1+x^2)*(1+x^4)/(1-x^7). (End)
From Wesley Ivan Hurt, Jul 11 2016: (Start)
a(n) = a(n-7) for n>7.
a(n) = 1 - Sum_{k=1..6} floor((n + k - 1)/7)*(-1)^k. (End)
MAPLE
a:= n-> [1, 0, 1, 0, 1, 0, 1][1+irem(n+6, 7)]:
seq(a(n), n=1..150); # Alois P. Heinz, Jan 22 2012
MATHEMATICA
PadRight[{}, 130, {1, 0, 1, 0, 1, 0, 1}] (* Harvey P. Dale, Feb 14 2015 *)
Table[Boole@ Or[OddQ@ #, # == 0] &@ Mod[n, 7], {n, 120}] (* or *)
Rest@ CoefficientList[Series[x (1 - x^8)/((1 - x^2) (1 - x^7)), {x, 0, 120}], x] (* or *)
Table[1 - Sum[Floor[(n + k - 1)/7] (-1)^k, {k, 6} ], {n, 120}] (* Michael De Vlieger, Jul 13 2016 *)
PROG
&cat [[1, 0, 1, 0, 1, 0, 1]^^20]; // Wesley Ivan Hurt, Jul 11 2016
(PARI) a(n)=1-(n-1)%7%2 \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
Cf. A115788.
Sequence in context: A276793 A284364 A115788 * A351077 A229940 A179761
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Jan 22 2012
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 April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)