%I #12 Dec 14 2023 05:09:08
%S 1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,
%T 2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,
%U 1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1,0,-1,1,2,1,-1,0,1,1
%N a(n+2) = abs(a(n+1)) - a(n), a(0)=1, a(1)=0.
%C For any initial values a(0), a(1), the sequence of real numbers {a(n)} satisfying the relation a(n+2) = |a(n+1)| - a(n) is periodic with period 9.
%H M. Brown and J. F. Slifker, <a href="http://www.jstor.org/stable/2322886">Solution to Problem 6439</a>, Amer. Math. Monthly, 92 (1985), p. 218.
%H M. Crampin, <a href="http://www.jstor.org/stable/3618372">Piecewise linear recurrence relations</a>, Math. Gaz., November 1992, p. 355.
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 1).
%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 0, -1, 1, 2, 1, -1, 0, 1},100] (* _Ray Chandler_, Aug 26 2015 *)
%K sign
%O 0,5
%A Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002