cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A076840 #24 Feb 24 2024 01:04:39
%S A076840 1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,
%T A076840 3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,
%U A076840 2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2,5,3,2,1,1,2
%N A076840 a(1) = a(2) = 1; a(n) = (a(n-1) + 1)/a(n-2) (for n>2, n odd), (a(n-1)^2 + 1)/a(n-2) (for n>2, n even).
%C A076840 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)^2+1)/a(n-2) (for n>2, n even) has period 6. 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 A076840 Sergey Fomin and Andrei Zelevinsky, <a href="https://arxiv.org/abs/math/0208229">Cluster algebras II: Finite type classification</a>, arXiv:math/0208229 [math.RA], 2002-2003.
%H A076840 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).
%p A076840 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)^2+1)/f(n-2)); end;
%t A076840 LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 1, 2, 5, 3, 2}, 105] (* _Jean-François Alcover_, Nov 22 2017 *)
%Y A076840 Cf. A076839, A076841, A076844.
%K A076840 nonn,easy
%O A076840 1,3
%A A076840 _N. J. A. Sloane_, Nov 21 2002