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.

Original entry on oeis.org

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, 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, 11, 7, 1, 1, 7, 11, 13, 14, 10, 6, 2, 2, 6, 10, 14, 15, 13, 11
Offset: 0

Views

Author

Ron R. King, Mar 07 2009

Keywords

Crossrefs

Sum of numerator and denominator is given by A038567.

Programs

  • 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

Extensions

Terms a(56) and beyond from Andrew Howroyd, Feb 03 2021