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.

A229742 a(n) = A071585(n) - A071766(n).

This page as a plain text file.
%I A229742 #54 Aug 16 2025 22:24:07
%S A229742 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 A229742 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 A229742 8,7,11,13,14,13,17,15,18,11,16,17,19,14
%N A229742 a(n) = A071585(n) - A071766(n).
%C A229742 From _Yosu Yurramendi_, Jun 30 2014: (Start)
%C A229742 If the terms (n>0) are written as an array (left-aligned fashion):
%C A229742   1,
%C A229742   2,1,
%C A229742   3,3, 1, 2,
%C A229742   4,5, 4, 5,1, 2, 3, 3,
%C A229742   5,7, 7, 8,5, 7, 7, 8,1,2, 3, 3,4, 5, 4, 5,
%C A229742   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 A229742 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 A229742 The first terms of each column give A071766. The second terms of each column give A086593. So, A086593(n) = A071585(n) + A071766(n).
%C A229742 If the rows (n>0) are written in a right-aligned fashion:
%C A229742                                                                            1,
%C A229742                                                                          2,1,
%C A229742                                                                      3,3,1,2,
%C A229742                                                              4,5,4,5,1,2,3,3,
%C A229742                                              5,7,7,8,5,7,7,8,1,2,3,3,4,5,4,5,
%C A229742    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 A229742 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). (End)
%H A229742 <a href="/index/Fo#fraction_trees">Index entries for fraction trees</a>
%F A229742 From _Yosu Yurramendi_, May 26 2019: (Start)
%F A229742 a(2^(m+1)+2^m+k) = A071585(    k)
%F A229742 a(2^(m+1)    +k) = A071585(2^m+k), m >= 0, 0 <= k < 2^m. (End)
%F A229742 a(n) = A002487(A059893(A006068(n))) = A002487(1+A059893(A233279(n))), n > 0. - _Yosu Yurramendi_, Sep 29 2021
%e A229742 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 A229742 (R)
%o A229742 blocklevel <- 6 # arbitrary
%o A229742 a <- 1
%o A229742 for(m in 0:blocklevel) for(k in 0:(2^(m-1)-1)){
%o A229742   a[2^(m+1)+k]             <- a[2^m+k] + a[2^m+2^(m-1)+k]
%o A229742   a[2^(m+1)+2^(m-1)+k]     <- a[2^(m+1)+k]
%o A229742   a[2^(m+1)+2^m+k]         <- a[2^m+2^(m-1)+k]
%o A229742   a[2^(m+1)+2^m+2^(m-1)+k] <- a[2^m+k]
%o A229742 }
%o A229742 a
%o A229742 # _Yosu Yurramendi_, Jul 11 2014
%Y A229742 Cf. A071585, A071766, A086593, A238837.
%K A229742 nonn,frac
%O A229742 0,3
%A A229742 _N. J. A. Sloane_, Oct 05 2013, at the suggestion of _Kevin Ryde_