|
|
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
|
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)
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)]:
|
|
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
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|