login
a(1) = a(2) = 1; a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^3+1)/a(n-2) (for n>2, n even).
3

%I #20 Feb 24 2024 01:04:46

%S 1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,

%T 1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,

%U 1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2,9,5,14,3,2,1,1,2

%N a(1) = a(2) = 1; a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^3+1)/a(n-2) (for n>2, n even).

%C Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^3+1)/a(n-2) (for n>2, n even) has period 8. The theory of cluster algebras currently being developed by Fomin and Zelevinsky gives a context for these facts, but it doesn't really explain them in an elementary way. - _James Propp_, Nov 20, 2002

%H Sergey Fomin and Andrei Zelevinsky, <a href="http://arXiv.org/abs/math.RA/0208229">Cluster algebras II: Finite type classification</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 1).

%p a := 1; b := 1; f := proc(n) option remember; global a,b; if n=1 then RETURN(a); fi; if n=2 then RETURN(b); fi; if n mod 2 = 1 then RETURN((f(n-1)+1)/f(n-2)); fi; RETURN((f(n-1)^3+1)/f(n-2)); end;

%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1},{1, 1, 2, 9, 5, 14, 3, 2},99] (* _Ray Chandler_, Aug 25 2015 *)

%Y Cf. A076839, A076840, A076844.

%K nonn

%O 1,3

%A _N. J. A. Sloane_, Nov 21 2002