login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
1
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,4
LINKS
PROG
(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
CROSSREFS
Sum of numerator and denominator is given by A038567.
Sequence in context: A355792 A286093 A078827 * A328732 A130795 A367634
KEYWORD
nonn,look
AUTHOR
Ron R. King, Mar 07 2009
EXTENSIONS
Terms a(56) and beyond from Andrew Howroyd, Feb 03 2021
STATUS
approved