login
A241979
(0,1) sequence such that lengths of three consecutive runs are always distinct.
1
0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1
OFFSET
0
COMMENTS
Periodic with period 12;
a(n+6) = 1 - a(n).
EXAMPLE
. a(n): 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0
. runs: 0, 11, 000, 1, 00, 111, 0, 11, 000, 1, 00
. lengths: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, -1, 1}, {0, 1, 1, 0, 0, 0, 1}, 108] (* Ray Chandler, Aug 27 2015 *)
PROG
(Haskell)
a241979 n = a241979_list !! n
a241979_list = cycle [0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1]
CROSSREFS
Cf. A010882 (run lengths).
Sequence in context: A280910 A305816 A359820 * A200244 A261185 A093692
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 10 2014
EXTENSIONS
Extended by Ray Chandler, Aug 27 2015
STATUS
approved