|
|
A335690
|
|
a(1) = 1, a(2) = a(3) = 2; a(n) = (a(n-1) + a(n-2) + 1)/a(n-3) (for n>3).
|
|
0
|
|
|
1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4, 5, 2, 2, 1, 2, 2, 5, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This is another illustration of the 8-cycle discovered by H. Todd - see Lyness, Note 1847. Compare A076844. - N. J. A. Sloane, Jul 19 2020
|
|
LINKS
|
|
|
MAPLE
|
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;
|
|
MATHEMATICA
|
RecurrenceTable[{a[1]==1, a[2]==a[3]==2, a[n]==(a[n-1]+a[n-2]+1)/a[n-3]}, a, {n, 90}] (* or *) PadRight[{}, 90, {1, 2, 2, 5, 4, 5, 2, 2}] (* Harvey P. Dale, May 28 2021 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|