cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A317161 #29 Aug 23 2018 08:32:14
%S A317161 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,
%T A317161 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,
%U A317161 -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
%N 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.
%C A317161 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.
%H A317161 Altug Alkan, <a href="/A317161/b317161.txt">Table of n, a(n) for n = 1..24064</a>
%H A317161 Altug Alkan, <a href="/A317161/a317161.png">Scatterplot of a(n) for n <= 24064</a>
%t A317161 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 *)
%o A317161 (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)
%Y A317161 Cf. A005185, A317754.
%K A317161 sign,look
%O A317161 1,18
%A A317161 _Altug Alkan_, Aug 07 2018