%I #63 Apr 23 2024 11:13:31
%S 1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
%T 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
%U 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0
%N 1, then repeat 1,0.
%C This is Guy Steele's sequence GS(2, 1) (see A135416).
%C 2-adic expansion of 1/3 (right to left): 1/3 = ...01010101010101011. - _Philippe Deléham_, Mar 24 2009
%C Also, with offset 0, parity of A036467(n-1). - _Omar E. Pol_, Mar 17 2015
%C Appears to be the Gilbreath transform of 1,2,3,5,7,11,13,... (A008578). (This is essentially the same as the Gilbreath conjecture, see A036262.) - _N. J. A. Sloane_, May 08 2023
%H Andrei Asinowski, Cyril Banderier, and Valerie Roitner, <a href="https://lipn.univ-paris13.fr/~banderier/Papers/several_patterns.pdf">Generating functions for lattice paths with several forbidden patterns</a>, (2019).
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F G.f.: x*(1+x-x^2)/(1-x^2). - _Philippe Deléham_, Feb 08 2012
%F G.f.: x / (1 - x / (1 + x / (1 + x / (1 - x)))). - _Michael Somos_, Apr 02 2012
%F a(n) = A049711(n+2) mod 2. - _Ctibor O. Zizka_, Jan 28 2019
%e G.f. = x + x^2 + x^4 + x^6 + x^8 + x^10 + x^12 + x^14 + x^16 + x^18 + x^20 + ...
%p GS(2,1,200); [see A135416].
%t Prepend[Table[Mod[n + 1, 2], {n, 2, 60}], 1] (* _Michael De Vlieger_, Mar 17 2015 *)
%t PadRight[{1},120,{0,1}] (* _Harvey P. Dale_, Apr 23 2024 *)
%o (Haskell)
%o a135528 n = a135528_list !! (n-1)
%o a135528_list = concat $ iterate ([1,0] *) [1]
%o instance Num a => Num [a] where
%o fromInteger k = [fromInteger k]
%o (p:ps) + (q:qs) = p + q : ps + qs
%o ps + qs = ps ++ qs
%o (0:ps) * qs = 0 : ps * qs
%o (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
%o _ * _ = []
%o -- _Reinhard Zumkeller_, Apr 02 2011
%Y Cf. A008578, A036467, A049711, A135416.
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_, based on a message from Guy Steele and _Don Knuth_, Mar 01 2008