Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #6 Jan 10 2021 11:15:57
%S 0,1,2,2,3,2,4,1,2,2,3,2,4,5,3,3,5,5,2,6,4,4,4,6,3,5,4,5,6,6,4,4,6,6,
%T 3,5,6,5,6,7,3,6,5,7,5,4,8,3,6,7,7,7,5,6,7,7,4,8,7,6,6,5,8,4,9,7,6,8,
%U 8,4,5,7,8,6,8,9,8,7,5,9,8,6,7,6,9,7,10,7,7,9,7,5,7,8,8
%N a(n+1) = a(n-a(n)*(a(n)-1)/2) + 1, starting with a(1) = 0.
%C To obtain the next term, compute the binomial(a,2) with the current term, then count back its value and add 1.
%C The sequence cannot repeat. Proof: Assume a finite period. Label an arbitrary term in the period x. Because of the back-referencing definition it follows that x-1 has to be in the period, and by the same argument so does x-2 and x-3, x-4, ... until 0. But it is not possible to obtain new 0s since each new term is larger than one already existing term.
%C Every positive integer appears in the sequence.
%C First occurrence of n: 1, 2, 3, 5, 7, 14, 20, 40, 47, 65, 87, 124, 170, 210, 258, 310, 389, 469, 548, 640, 758, 864, ...
%C The sequence appears to grow with the cube root of n, which is expected since f(x) = (6*x)^(1/3) satisfies the definition for large x, i.e., lim_{x->oo} f(x+1)-(f(x-f(x)*(f(x)-1)/2)+1) = 0.
%C Each term is determined by referencing an earlier term. Following the chain of these references we can uniquely trace back every term to the initial zero, e.g., a(40) -> a(24) -> a(17) -> a(13) -> a(11) -> a(9) -> a(8) -> a(1). These progressions form a tree, with the zero being at its root (for visualization see the Links section). The average branching factor B (number of links divided by the number of non-leaf nodes) is numerically evaluated to B = 1.380... (for n = 10^8). Considering the asymptotic behavior of the sequence a(n) ~ (6*n)^(1/3), we can expect that the number of links within a range (n,m) is asymptotically equal to m-n and therefore B is the inverse of the proportion of non-leaf terms (B = 1.380... then implies that roughly 27.5% of all terms never get referenced).
%H Rok Cestnik, <a href="/A340224/a340224.pdf">Term-referencing tree for 500 terms</a>
%H Rok Cestnik, <a href="/A340224/a340224.py.txt">Program for plotting the term-referencing tree</a>
%F a(n) ~ (6*n)^(1/3) (conjectured).
%e a(2) = a(1-a(1)*(a(1)-1)/2)+1 = a(1)+1 = 1.
%e a(3) = a(2-a(2)*(a(2)-1)/2)+1 = a(2)+1 = 2.
%e a(4) = a(3-a(3)*(a(3)-1)/2)+1 = a(2)+1 = 2.
%e a(5) = a(4-a(4)*(a(4)-1)/2)+1 = a(3)+1 = 3.
%o (Python)
%o a = [0]
%o for n in range(1000):
%o a.append(a[int(n-a[n]*(a[n]-1)/2)]+1)
%Y Related to A339929.
%Y Cf. A330772, A340134, A005206, A002516.
%K nonn
%O 1,3
%A _Rok Cestnik_, Jan 01 2021