A125676 a(n) = floor(abs(b(n))), where b(1) = 2, b(n) = b(n-1) - 1/b(n-1).
2, 1, 0, 0, 2, 1, 1, 0, 0, 0, 0, 1, 1, 0, 3, 3, 3, 2, 2, 1, 1, 0, 1, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 22, 22, 22, 22, 22, 22, 22, 22
Offset: 1
Keywords
Programs
-
Mathematica
f[l_List] := Append[l, l[[ -1]] - 1/l[[ -1]]];Floor /@ Abs /@ Nest[f, {2}, 30] (* Ray Chandler, Feb 08 2007 *)
-
PARI
lista(nn) = my(b=2); print1(2); for(n=2, nn, print1(", ", floor(abs(b-=1/b)))); \\ Jinyuan Wang, Aug 10 2021
Extensions
a(9)-a(31) from Ray Chandler, Feb 08 2007
More terms from Jinyuan Wang, Aug 10 2021