|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|