login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020652 Numerators in canonical bijection from positive integers to positive rationals. 22
1, 1, 2, 1, 3, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 5, 6, 1, 3, 5, 7, 1, 2, 4, 5, 7, 8, 1, 3, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 5, 7, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 3, 5, 9, 11, 13, 1, 2, 4, 7, 8, 11, 13, 14, 1, 3, 5, 7, 9, 11, 13, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(A002088(n)) = 1 for n > 1. - Reinhard Zumkeller, Jul 29 2012

REFERENCES

S. Cook, Problem 511: An Enumeration Problem, Journal of Recreational Mathematics, Vol. 9:2 (1976-77), 137. Solution by the Problem Editor, JRM, Vol. 10:2 (1977-78), 122-123.

Richard Courant and Herbert Robbins. What Is Mathematics?, Oxford, 1941, pp. 79-80.

H. Lauwerier, Fractals, Princeton Univ. Press, p. 23.

LINKS

David Wasserman, Table of n, a(n) for n = 1..100000

Paul Yiu, Recreational Mathematics, 24.3.1 Appendix: Two enumerations of the rational numbers in (0,1), page 633.

Index entries for sequences related to Stern's sequences

Index entries for "core" sequences

EXAMPLE

Arrange positive fractions < 1 by increasing denominator then by increasing numerator: 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6 ... (this is A020652/A038567). [From William Rex Marshall, Dec 16 2010]

MAPLE

with (numtheory): A020652 := proc (n) local sum, j, k; sum := 0: k := 2: while (sum < n) do: sum := sum + phi(k): k := k + 1: od: sum := sum - phi(k-1): j := 1; while sum < n do: if gcd(j, k-1) = 1 then sum := sum + 1: fi: j := j+1: od: RETURN (j-1): end: # from UlrSchimke(AT)aol.com, Nov 06, 2001

MATHEMATICA

Reap[Do[If[GCD[num, den] == 1, Sow[num]], {den, 1, 20}, {num, 1, den-1}] ][[2, 1]] (* Jean-François Alcover, Oct 22 2012 *)

PROG

(Haskell)

a020652 n = a020652_list !! (n-1)

a020652_list = map fst [(u, v) | v <- [1..], u <- [1..v-1], gcd u v == 1]

-- Reinhard Zumkeller, Jul 29 2012

(PARI) a(n)=my(s, j=1, k=1); while(s<n, s+=eulerphi(k++); ); s-=eulerphi(k); while(s<n, if(gcd(j, k)==1, s++); j++); j-1 \\ Charles R Greathouse IV, Feb 07 2013

CROSSREFS

Essentially the same as A038566, which is the main entry for this sequence.

Cf. A020653, A038567-A038569, A182972-A182976.

A054424 gives mapping to Stern-Brocot tree.

Cf. A037161.

Sequence in context: A132589 A054843 A038566 * A096107 A128487 A056609

Adjacent sequences:  A020649 A020650 A020651 * A020653 A020654 A020655

KEYWORD

nonn,frac,core,nice

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 24 15:28 EDT 2013. Contains 225624 sequences.