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.

A057432 Obtained by reading first the numerator then the denominator of fractions in left-hand half of Stern-Brocot tree (A007305/A007306).

This page as a plain text file.
%I A057432 #20 Aug 13 2025 23:15:09
%S A057432 1,1,1,2,1,3,2,3,1,4,2,5,3,5,3,4,1,5,2,7,3,8,3,7,4,7,5,8,5,7,4,5,1,6,
%T A057432 2,9,3,11,3,10,4,11,5,13,5,12,4,9,5,9,7,12,8,13,7,11,7,10,8,11,7,9,5,
%U A057432 6,1,7,2,11,3,14,3,13,4,15,5,18,5,17,4,13,5,14,7,19,8,21,7,18,7,17,8,19,7
%N A057432 Obtained by reading first the numerator then the denominator of fractions in left-hand half of Stern-Brocot tree (A007305/A007306).
%H A057432 N. J. A. Sloane, <a href="/stern_brocot.html">Stern-Brocot or Farey Tree</a>
%H A057432 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>
%e A057432 The tree begins:
%e A057432                                      1/1
%e A057432                                      1/2
%e A057432                   1/3                                   2/3
%e A057432         1/4                 2/5               3/5                 3/4
%e A057432     1/5      2/7       3/8       3/7     4/7       5/8       5/7      4/5
%e A057432   1/6 2/9 3/11 3/10 4/11 5/13 5/12 4/9 5/9 7/12 8/13 7/11 7/10 8/11 7/9 5/6
%t A057432 sbt[n_]:=Module[{P,L,Y},P={{1,0},{1,1}};L={{1,1},{0,1}};Y={{1,0},{0,1}}; w[b_]:=Fold[ #1.If[ #2==0,L,P]&,Y,b]; u[a_]:={a[[2,1]]+a[[2,2]],a[[1,1]]+a[[1,2]]}; s[l_]:={l,{Last[l],First[l]}}; Map[s,Map[u,Map[w,Part[Partition[Tuples[{0,1},n],2^(n-1)],1]]]]]
%t A057432 Flatten[Append[{1,1},Table[Map[First,sbt[i]],{i,1,6}]]] (* _Peter Luschny_, Apr 27 2009 *)
%Y A057432 Cf. A007305, A047679, A007306, A002487, A057431.
%Y A057432 Related to the Kepler tree A294442 via row permutations given by A088208 or A131271.
%K A057432 nonn,easy,tabf
%O A057432 0,4
%A A057432 _N. J. A. Sloane_, Sep 08 2000
%E A057432 More terms from _Alford Arnold_, Sep 11 2000
%E A057432 More terms from _Joshua Zucker_, May 11 2006