login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157813 Denominators 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, ...). 5

%I #24 Oct 10 2023 16:20:34

%S 1,1,2,3,1,1,2,3,4,5,1,1,2,3,4,5,6,7,5,3,1,1,2,4,5,7,8,9,7,3,1,1,2,3,

%T 4,5,6,7,8,9,10,11,7,5,1,1,2,3,4,5,6,7,8,9,10,11,12,13,11,9,5,3,1,1,2,

%U 4,7,8,11,13,14,15,13,11,9,7,5,3,1,1,2,3,4

%N Denominators 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 Robert Israel, <a href="/A157813/b157813.txt">Table of n, a(n) for n = 1..10000</a>

%p R:= NULL: count:= 0:

%p for m from 2 while count < 100 do

%p S:= select(t -> igcd(t,m-t)=1, [$1..m-1]);

%p count:= count+nops(S);

%p if m::odd then R:= R, op(S) else R:= R, seq(m-t,t=S) fi;

%p od:

%p R; # _Robert Israel_, Oct 09 2023

%o (Python)

%o from math import gcd

%o for s in range(2, 100, 2):

%o for i in range(1, s):

%o if gcd(i, s - i) != 1: continue

%o print(s - i)

%o for i in range(s, 0, -1):

%o if gcd(i, s + 1 - i) != 1: continue

%o print(s + 1 - i)

%o # _Hiroaki Yamanouchi_, Oct 06 2014

%Y Cf. A157807 (numerators), A038567.

%Y With Cantor's ordering: A020652, A020653, A352911.

%K nonn,frac

%O 1,3

%A _Ron R. King_, Mar 07 2009

%E a(58)-a(83) from _Hiroaki Yamanouchi_, Oct 06 2014

%E Name corrected by _Andrey Zabolotskiy_, Oct 10 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)