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.
%I A071766 #68 Apr 24 2024 04:14:24 %S A071766 1,1,1,2,1,2,3,3,1,2,3,3,4,5,4,5,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,1,2, %T A071766 3,3,4,5,4,5,5,7,7,8,5,7,7,8,6,9,10,11,9,12,11,13,6,9,10,11,9,12,11, %U A071766 13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,6,9,10,11,9,12,11,13 %N A071766 Denominator of the continued fraction expansion whose terms are the first-order differences of exponents in the binary representation of 4n, with the exponents of 2 being listed in descending order. %C A071766 If the terms (n>0) are written as an array: %C A071766 1, %C A071766 1, 2, %C A071766 1, 2, 3, 3, %C A071766 1, 2, 3, 3, 4, 5, 4, 5, %C A071766 1, 2, 3, 3, 4, 5, 4, 5, 5, 7, 7, 8, 5, 7, 7, 8, %C A071766 1, 2, 3, 3, 4, 5, 4, 5, 5, 7, 7, 8, 5, 7, 7, 8, 6, 9, 10, 11, 9, 12, 11, 13, 6, 9, %C A071766 then the sum of the m-th row is 3^m (m = 0,1,2,3,...), each column is constant and the terms are from A071585 (a(2^m+k) = A071585(k), k = 0,1,2,...). %C A071766 If the rows are written in a right-aligned fashion: %C A071766 1, %C A071766 1, 2, %C A071766 1, 2, 3, 3, %C A071766 1, 2, 3, 3, 4, 5, 4, 5, %C A071766 1, 2, 3, 3, 4, 5, 4, 5, 5, 7, 7, 8, 5, 7, 7, 8, %C A071766 ..., 7, 7, 8, 5, 7, 7, 8, 6, 9, 10, 11, 9, 12, 11, 13, 6, 9, 10, 11, 9, 12, 11, 13, %C A071766 then each column is a Fibonacci sequence (a(2^(m+2)+k) = a(2^(m+1)+k) + a(2^m+k), m = 0,1,2,..., k = 0,1,2,...,2^m-1 with a_k(1) = A071766(k) and a_k(2) = A086593(k) being the first two terms of each column sequence). - _Yosu Yurramendi_, Jun 23 2014 %H A071766 Paul D. Hanna, <a href="/A071766/b071766.txt">Table of n, a(n) for n = 0..10000</a> %H A071766 <a href="/index/Fo#fraction_trees">Index entries for fraction trees</a> %F A071766 a(n) = A071585(m), where m = n - floor(log_2(n)); %F A071766 a(0) = 1, a(2^k) = 1, a(2^k + 1) = 2. %F A071766 a(2^k - 1) = Fibonacci(k+1) = A000045(k+1). %F A071766 a(2^m+k) = A071585(k), m=0,1,2,..., k=0,1,2,...,2^m-1. - _Yosu Yurramendi_, Jun 23 2014 %F A071766 a(2^m-k) = F_k(m), k=0,1,2,..., m > log_2(k). F_k(m) is a Fibonacci sequence, where F_k(1) = a(2^(m_0(k))-1-k), F_k(2) = a(2^(m_0(k)+1)-1-k), m_0(k) = ceiling(log_2(k+1))+1 = A070941(k). - _Yosu Yurramendi_, Jun 23 2014 %F A071766 a(n) = A002487(A059893(A233279(n))) = A002487(1+A059893(A006068(n))), n > 0. - _Yosu Yurramendi_, Sep 29 2021 %e A071766 a(37) = 5 as it is the denominator of 17/5 = 3 + 1/(2 + 1/2), which is a continued fraction that can be derived from the binary expansion of 4*37 = 2^7 + 2^4 + 2^2; the binary exponents are {7, 4, 2}, thus the differences of these exponents are {3, 2, 2}; giving the continued fraction expansion of 17/5 = [3,2,2]. %e A071766 1, 2, 3, 3/2, 4, 5/2, 4/3, 5/3, 5, 7/2, 7/3, 8/3, 5/4, 7/5, 7/4, 8/5, 6, ... %t A071766 {1}~Join~Table[Denominator@ FromContinuedFraction@ Append[Abs@ Differences@ #, Last@ #] &@ Log2[NumberExpand[4 n, 2] /. 0 -> Nothing], {n, 120}] (* Version 11, or *) %t A071766 {1}~Join~Table[Denominator@ FromContinuedFraction@ Append[Abs@ Differences@ #, Last@ #] &@ Log2@ DeleteCases[# Reverse[2^Range[0, Length@ # - 1]] &@ IntegerDigits[4 n, 2], k_ /; k == 0], {n, 120}] (* _Michael De Vlieger_, Aug 15 2016 *) %o A071766 (R) %o A071766 blocklevel <- 6 # arbitrary %o A071766 a <- 1 %o A071766 for(m in 0:blocklevel) for(k in 0:(2^(m-1)-1)){ %o A071766 a[2^(m+1)+k] <- a[2^m+k] %o A071766 a[2^(m+1)+2^(m-1)+k] <- a[2^m+2^(m-1)+k] %o A071766 a[2^(m+1)+2^m+k] <- a[2^(m+1)+k] + a[2^(m+1)+2^(m-1)+k] %o A071766 a[2^(m+1)+2^m+2^(m-1)+k] <- a[2^(m+1)+2^m+k] %o A071766 } %o A071766 a %o A071766 # _Yosu Yurramendi_, Jul 11 2014 %Y A071766 Cf. A071585, A086593. %K A071766 easy,nonn,frac %O A071766 0,4 %A A071766 _Paul D. Hanna_, Jun 04 2002