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