%I #49 Apr 24 2024 14:52:55
%S 0,1,2,1,3,3,1,2,4,5,4,5,1,2,3,3,5,7,7,8,5,7,7,8,1,2,3,3,4,5,4,5,6,9,
%T 10,11,9,12,11,13,6,9,10,11,9,12,11,13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,
%U 8,7,11,13,14,13,17,15,18,11,16,17,19,14
%N a(n) = A071585(n) - A071766(n).
%C From _Yosu Yurramendi_, Jun 30 2014: (Start)
%C If the terms (n>0) are written as an array (left-aligned fashion):
%C 1,
%C 2,1,
%C 3,3, 1, 2,
%C 4,5, 4, 5,1, 2, 3, 3,
%C 5,7, 7, 8,5, 7, 7, 8,1,2, 3, 3,4, 5, 4, 5,
%C 6,9,10,11,9,12,11,13,6,9,10,11,9,12,11,13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,
%C then the sum of the k-th row is 3^(k-1) and each column is an arithmetic sequence. The differences of the arithmetic sequences gives the sequence A071585 (a(2^(p+1)+k) - a(2^p+k) = A071585(k), p = 0,1,2,..., k = 0,1,2,...,2^p-1).
%C The first terms of each column give A071766. The second terms of each column give A086593. So, A086593(n) = A071585(n) + A071766(n).
%C If the rows (n>0) are written in a right-aligned fashion:
%C 1,
%C 2,1,
%C 3,3,1,2,
%C 4,5,4,5,1,2,3,3,
%C 5,7,7,8,5,7,7,8,1,2,3,3,4,5,4,5,
%C 6,9,10,11,9,12,11,13,6,9,10,11,9,12,11,13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,
%C then each column is a Fibonacci sequence (a(2^(p+2)+k) = a(2^(p+1)+k) + a(2^p+k) p = 0,1,2,..., k = 0,1,2,...,2^p-1, with a_k(1) = A071585(k) and a_k(2) = A071766(k) being the first two terms of each column sequence).
%H <a href="/index/Fo#fraction_trees">Index entries for fraction trees</a>
%F From _Yosu Yurramendi_, May 26 2019: (Start)
%F a(2^(m+1)+2^m+k) = A071585( k)
%F a(2^(m+1) +k) = A071585(2^m+k), m >= 0, 0 <= k < 2^m. (End)
%F a(n) = A002487(A059893(A006068(n))) = A002487(1+A059893(A233279(n))), n > 0. - _Yosu Yurramendi_, Sep 29 2021
%e A229742/A071766 = 0, 1, 2, 1/2, 3, 3/2, 1/3, 2/3, 4, 5/2, 4/3, 5/3, 1/4, 2/5, 3/4, 3/5, 5, 7/2, 7/3, 8/3, 5/4, 7/5, 7/4, 8/5, ... (this is the HCS form of the Stern-Brocot tree).
%o (R)
%o blocklevel <- 6 # arbitrary
%o a <- 1
%o for(m in 0:blocklevel) for(k in 0:(2^(m-1)-1)){
%o a[2^(m+1)+k] <- a[2^m+k] + a[2^m+2^(m-1)+k]
%o a[2^(m+1)+2^(m-1)+k] <- a[2^(m+1)+k]
%o a[2^(m+1)+2^m+k] <- a[2^m+2^(m-1)+k]
%o a[2^(m+1)+2^m+2^(m-1)+k] <- a[2^m+k]
%o }
%o a
%o # _Yosu Yurramendi_, Jul 11 2014
%Y Cf. A071585, A071766, A086593, A238837.
%K nonn,frac
%O 0,3
%A _N. J. A. Sloane_, Oct 05 2013, at the suggestion of _Kevin Ryde_.