login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

(0,1) sequence such that lengths of three consecutive runs are always distinct.
1

%I #11 Aug 27 2015 08:50:06

%S 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,

%T 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,

%U 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

%N (0,1) sequence such that lengths of three consecutive runs are always distinct.

%C Periodic with period 12;

%C a(n+6) = 1 - a(n).

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

%e . a(n): 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0

%e . runs: 0, 11, 000, 1, 00, 111, 0, 11, 000, 1, 00

%e . lengths: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2

%t LinearRecurrence[{1, 0, 0, 0, 0, -1, 1},{0, 1, 1, 0, 0, 0, 1},108] (* _Ray Chandler_, Aug 27 2015 *)

%o (Haskell)

%o a241979 n = a241979_list !! n

%o a241979_list = cycle [0,1,1,0,0,0,1,0,0,1,1,1]

%Y Cf. A010882 (run lengths).

%K nonn

%O 0

%A _Reinhard Zumkeller_, Aug 10 2014

%E Extended by _Ray Chandler_, Aug 27 2015