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 A157807 #28 Oct 10 2023 14:02:19 %S A157807 1,2,1,1,3,4,3,2,1,1,5,6,5,4,3,2,1,1,3,5,7,8,7,5,4,2,1,1,3,7,9,10,9,8, %T A157807 7,6,5,4,3,2,1,1,5,7,11,12,11,10,9,8,7,6,5,4,3,2,1,1,3,5,9,11,13,14, %U A157807 13,11,8,7,4,2,1,1,3,5,7,9,11,13,15,16,15,14 %N A157807 Numerators of fractions arranged in "antidiagonal boustrophedon" ordering with equivalent fractions removed: (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, 5/2, ...). %H A157807 Robert Israel, <a href="/A157807/b157807.txt">Table of n, a(n) for n = 1..10000</a> %p A157807 R:= NULL: count:= 0: %p A157807 for m from 2 while count < 100 do %p A157807 S:= select(t -> igcd(t,m-t)=1, [$1..m-1]); %p A157807 count:= count+nops(S); %p A157807 if m::even then R:= R, op(S) else R:= R, seq(m-t,t=S) fi; %p A157807 od: %p A157807 R; # _Robert Israel_, Oct 09 2023 %o A157807 (Python) %o A157807 from math import gcd %o A157807 for s in range(2, 100, 2): %o A157807 for i in range(1, s): %o A157807 if gcd(i, s - i) != 1: continue %o A157807 print(i) %o A157807 for i in range(s, 0, -1): %o A157807 if gcd(i, s + 1 - i) != 1: continue %o A157807 print(i) %o A157807 # _Hiroaki Yamanouchi_, Oct 06 2014 %Y A157807 Cf. A157813 (denominators), A038566. %Y A157807 With Cantor's ordering: A020652, A020653, A352911. %K A157807 nonn,frac %O A157807 1,2 %A A157807 _Ron R. King_, Mar 07 2009 %E A157807 A-number in cross-reference corrected by _R. J. Mathar_, Sep 23 2009 %E A157807 a(19)-a(20) corrected and a(58)-a(82) added by _Hiroaki Yamanouchi_, Oct 06 2014 %E A157807 Name corrected by _Andrey Zabolotskiy_, Oct 10 2023