|
|
A317161
|
|
Let b(1) = b(2) = 1; for n >= 3, b(n) = n - b(t(n)) - b(n-t(n)) where t = A005185. a(n) = 2*b(n) - n.
|
|
1
|
|
|
1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 2, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, -2, -1, 0, -1, -2, -3, -2, -1, 0, 1, 0, -1, 0, -1, -2, 1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 2, 1, 0, 3, 0, 1, 2, 1, 2, 3, 2, 1, 2, 3, 0, 3, 2, 3, 4, 1, 2, 1, 0, -1, 0, 1, 0, 3, 0, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|