login
A067992
a(0)=1 and, for n > 0, a(n) is the smallest positive integer such that the ratios min(a(k)/a(k-1), a(k-1)/a(k)) for 0 < k <= n are all distinct.
11
1, 1, 2, 3, 1, 4, 3, 5, 1, 6, 5, 2, 7, 1, 8, 3, 7, 4, 5, 7, 6, 11, 1, 9, 2, 11, 3, 10, 1, 12, 5, 8, 7, 9, 4, 11, 5, 9, 8, 11, 7, 10, 9, 11, 10, 13, 1, 14, 3, 13, 2, 15, 1, 16, 3, 17, 1, 18, 5, 13, 4, 15, 7, 12, 11, 13, 6, 17, 2, 19, 1, 20, 3, 19, 4, 17, 5, 14, 9, 13, 7, 16, 5, 19, 6, 23, 1, 21, 2
OFFSET
0,3
COMMENTS
Every positive rational number appears exactly once as the ratio of adjacent terms (in either order). Conjecture: adjacent terms are always relatively prime. - Franklin T. Adams-Watters, Sep 13 2006
LINKS
Neil Calkin and Herbert S. Wilf, Recounting the rationals, The American Mathematical Monthly, Vol. 107, No. 4 (2000), 360-363.
Neil Calkin and Herbert S. Wilf, Recounting the rationals, Fermat's Library (2008).
FORMULA
a(6)=3, since 1/4 and 2/4 = 1/2 have already occurred as ratios of adjacent terms.
EXAMPLE
The sequence of all rational numbers between 0 and 1 obtained by taking ratios of sorted consecutive terms begins: 1/2, 2/3, 1/3, 1/4, 3/4, 3/5, 1/5, 1/6, 5/6, 2/5, 2/7, 1/7, 1/8, 3/8, 3/7, 4/7, 4/5, 5/7, 6/7. - Gus Wiseman, Aug 30 2018
MATHEMATICA
Nest[Function[seq, Append[seq, NestWhile[#+1&, 1, MemberQ[Divide@@@Sort/@Partition[seq, 2, 1], Min[Last[seq]/#, #/Last[seq]]]&]]], {1}, 100] (* Gus Wiseman, Aug 30 2018 *)
PROG
(PARI) seen = Set([]); other(p) = for (v=1, oo, my (r = min(v, p)/max(v, p)); if (!set search(seen, r), seen = set union(seen, Set([r])); return (v)))
for (n=0, 88, v = if (n==0, 1, other(v)); print1 (v ", ")) \\ Rémy Sigrist, Aug 07 2017
CROSSREFS
See A066720 for a somewhat similar sequence.
Sequence in context: A286234 A161621 A095701 * A317024 A354803 A140757
KEYWORD
nonn,look,nice,frac,hear
AUTHOR
John W. Layman, Feb 06 2002
STATUS
approved