OFFSET
1,18
COMMENTS
If there is a limiting value l such that lim_{n->infinity} b(n)/n = lim_{n->infinity} t(n)/n = l, then l = 1/2. So this sequence has definition a(n) = 2*b(n) - n.
LINKS
Altug Alkan, Table of n, a(n) for n = 1..24064
Altug Alkan, Scatterplot of a(n) for n <= 24064
MATHEMATICA
Block[{t = NestWhile[Function[{a, n}, Append[a, a[[n - a[[-1]] ]] + a[[n - a[[-2]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Last@ # < 65 &], b}, b = NestWhile[Function[{b, n}, Append[b, n - b[[t[[n]] ]] - b[[n - t[[n]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Length@ # < Length@ t &]; Array[2 b[[#]] - # &, Length@ b] ] (* Michael De Vlieger, Aug 08 2018 *)
PROG
(PARI) t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[n-t[n-1]]+t[n-t[n-2]]); b=vector(99); b[1]=b[2]=1; for(n=3, #b, b[n] = n-b[t[n]]-b[n-t[n]]); vector(99, k, 2*b[k]-k)
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 07 2018
STATUS
approved