%I #11 Sep 20 2024 03:04:31
%S 0,0,1,1,0,2,1,1,-2,4,5,-1,2,8,7,3,-4,14,15,-3,4,22,21,5,-6,32,33,-5,
%T 6,44,43,7,-8,58,59,-7,8,74,73,9,-10,92,93,-9,10,112,111,11,-12,134,
%U 135,-11,12,158,157,13,-14,184,185,-13,14,212,211,15,-16,242,243,-15,16,274,273,17,-18,308,309,-17,18,344
%N a(1)=0,a(2)=0,a(3)=1 then a(n)=abs(a(n-1)-a(n-2))+(-1)^n*a(n-3).
%C See A104156 for an order 2 example.
%D Benoit Cloitre, On strange predictible recursions, preprint 2006.
%F for n>=1 a(4n)=(-1)^n*(2*floor(n/2)-1), a(4*n+1)=(-1)^(n+1)*2*floor(n/2), a(4*n+2)=n^2-n+2, a(4*n+3)=n^2-n+2+(-1)^n.
%t s={0,0,1};Do[AppendTo[s,Abs[s[[-1]]-s[[-2]]]+(-1)^n*s[[-3]]] ,{n,2,76}];s (* _James C. McMahon_, Sep 18 2024 *)
%K sign
%O 0,6
%A _Benoit Cloitre_, May 30 2006