%I #13 Dec 14 2023 05:05:19
%S 1,2,3,3,4,5,5,4,5,5,4,3,3,2,1,1,2,1,1,2,3,3,4,5,5,4,5,5,4,3,3,2,1,1,
%T 2,1,1,2,3,3,4,5,5,4,5,5,4,3,3,2,1,1,2,1,1,2,3,3,4,5,5,4,5,5,4,3,3,2,
%U 1,1,2,1,1,2,3,3,4,5,5,4,5,5,4,3,3,2,1,1,2,1,1,2,3,3,4,5,5,4,5,5,4,3,3,2,1
%N Let u(1)=u(2)=u(3)=1 and u(n)=(-1)^n*sign(u(n-1)-u(n-2))*u(n-3), then a(n)=sum(k=1,n,u(k)).
%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, 0, 0, 0, -1, 1).
%F Periodic with period 18.
%t LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, -1, 1},{1, 2, 3, 3, 4, 5, 5, 4, 5, 5},105] (* _Ray Chandler_, Aug 27 2015 *)
%K nonn
%O 1,2
%A _Benoit Cloitre_, Nov 21 2002
|