%I #27 Feb 24 2024 01:04:50
%S 1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,
%T 1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,
%U 5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1,1,1,3,5,9,5,3,1
%N a(1) = a(2) = a(3) = 1; a(n) = (a(n-1) + a(n-2) + 1)/a(n-3) (for n>3).
%C Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1) + a(n-2) + 1)/a(n-3) (for n>3) has period 8. - _James Propp_, Nov 20 2002. This is the 8-cycle discovered by H. Todd - see Lyness, Note 1847. - _N. J. A. Sloane_, Jul 19 2020
%H R. C. Lyness, <a href="https://www.jstor.org/stable/3606036">Note 1581. Cycles</a>, Math. Gazette, 26 (1942), 62.
%H R. C. Lyness, <a href="https://www.jstor.org/stable/3609268">Note 1847. Cycles</a>, Math. Gaz., 29 (1945), 231-233.
%H R. C. Lyness, <a href="https://www.jstor.org/stable/3612778">Note 2952. Cycles</a>, Math. Gaz., 45 (1961), 207-209.
%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; c := 1; f := proc(n) option remember; global a,b,c; if n=1 then RETURN(a); fi; if n=2 then RETURN(b); fi; if n=3 then RETURN(c); fi; RETURN((f(n-1)+f(n-2)+1)/f(n-3)); end;
%t nxt[{a_,b_,c_}]:={b,c,(b+c+1)/a}; Transpose[NestList[nxt,{1,1,1},110]][[1]] (* or *) PadRight[{},110,{1,1,1,3,5,9,5,3}] (* _Harvey P. Dale_, Jan 13 2015 *)
%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1},{1, 1, 1, 3, 5, 9, 5, 3},105] (* _Ray Chandler_, Aug 25 2015 *)
%Y Cf. A076840, A076841, A076839, A076842, A076843.
%K nonn
%O 1,4
%A _N. J. A. Sloane_, Nov 21 2002
|