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.

A157806 Absolute value of the difference between numerator and denominator of fractions arranged by Cantor's ordering (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, ...) with equivalent fractions removed.

This page as a plain text file.
%I A157806 #7 Feb 03 2021 21:41:46
%S A157806 0,1,1,2,2,3,1,1,3,4,4,5,3,1,1,3,5,6,2,2,6,7,5,1,1,5,7,8,4,4,8,9,7,5,
%T A157806 3,1,1,3,5,7,9,10,2,2,10,11,9,7,5,3,1,1,3,5,7,9,11,12,8,4,4,8,12,13,
%U A157806 11,7,1,1,7,11,13,14,10,6,2,2,6,10,14,15,13,11
%N A157806 Absolute value of the difference between numerator and denominator of fractions arranged by Cantor's ordering (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, ...) with equivalent fractions removed.
%H A157806 Andrew Howroyd, <a href="/A157806/b157806.txt">Table of n, a(n) for n = 0..10000</a>
%o A157806 (PARI) seq(n)={my(L=List(), r=1, k=1); while(#L<=n, if(k==r, r++; k=0); k++; if(gcd(k,r-k)==1, listput(L, abs(r-2*k)))); Vec(L)} \\ _Andrew Howroyd_, Feb 03 2021
%Y A157806 Sum of numerator and denominator is given by A038567.
%K A157806 nonn,look
%O A157806 0,4
%A A157806 _Ron R. King_, Mar 07 2009
%E A157806 Terms a(56) and beyond from _Andrew Howroyd_, Feb 03 2021