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.

Showing 1-5 of 5 results.

A038566 Numerators in canonical bijection from positive integers to positive rationals <= 1: arrange fractions by increasing denominator then by increasing numerator.

Original entry on oeis.org

1, 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
Offset: 1

Views

Author

Keywords

Comments

For denominators see A038567.
Row n has length A000010(n).
Also numerators in canonical bijection from positive integers to all positive rational numbers: arrange fractions in triangle in which in the n-th row the phi(n) numbers are the fractions i/j with gcd(i,j) = 1, i+j=n, i=1..n-1, j=n-1..1. n>=2. Denominators (A020653) are obtained by reversing each row.
Also triangle in which n-th row gives phi(n) numbers between 1 and n that are relatively prime to n.
A038610(n) = least common multiple of n-th row. - Reinhard Zumkeller, Sep 21 2013
Row n has sum A023896(n). - Jamie Morken, Dec 17 2019
This irregular triangle gives in row n the smallest positive reduced residue system modulo n, for n >= 1. If one takes 0 for n = 1 it becomes the smallest nonnegative residue system modulo n. - Wolfdieter Lang, Feb 29 2020

Examples

			The beginning of the list of positive rationals <= 1: 1/1, 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, .... This is A038566/A038567.
The beginning of the triangle giving all positive rationals: 1/1; 1/2, 2/1; 1/3, 3/1; 1/4, 2/3, 3/2, 4/1; 1/5, 5/1; 1/6, 2/5, 3/4, 4/3, 5/2, 6/1; .... This is A020652/A020653, with A020652(n) = A038566(n+1). [Corrected by _M. F. Hasler_, Mar 06 2020]
The beginning of the triangle in which n-th row gives numbers between 1 and n that are relatively prime to n:
n\k 1 2 3  4  5  6  7  8 9 10 11 12 13 14 15 16 17 18
1:  1
2:  1
3:  1 2
4:  1 3
5:  1 2 3  4
6:  1 5
7:  1 2 3  4  5  6
8:  1 3 5  7
9:  1 2 4  5  7  8
10: 1 3 7  9
11: 1 2 3  4  5  6  7  8 9 10
12: 1 5 7 11
13: 1 2 3  4  5  6  7  8 9 10 11 12
14: 1 3 5  9 11 13
15: 1 2 4  7  8 11 13 14
16: 1 3 5  7  9 11 13 15
17: 1 2 3  4  5  6  7  8 9 10 11 12 13 14 15 16
18: 1 5 7 11 13 17
19: 1 2 3  4  5  6  7  8 9 10 11 12 13 14 15 16 17 18
20: 1 3 7  9 11 13 17 19
... Reformatted. - _Wolfdieter Lang_, Jan 18 2017
------------------------------------------------------
		

References

  • Richard Courant and Herbert Robbins. What Is Mathematics?, Oxford, 1941, pp. 79-80.
  • H. Lauwerier, Fractals, Princeton Univ. Press, p. 23.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 163.

Crossrefs

A054424 gives mapping to Stern-Brocot tree.
Row sums give rationals A111992(n)/A069220(n), n>=1.
A112484 (primes, rows n >=3).

Programs

  • Haskell
    a038566 n k = a038566_tabf !! (n-1) !! (k-1)
    a038566_row n = a038566_tabf !! (n-1)
    a038566_tabf=
       zipWith (\v ws -> filter ((== 1) . (gcd v)) ws) [1..] a002260_tabl
    a038566_list = concat a038566_tabf
    -- Reinhard Zumkeller, Sep 21 2013, Feb 23 2012
    
  • Maple
    s := proc(n) local i,j,k,ans; i := 0; ans := [ ]; for j while i
    				
  • Mathematica
    Flatten[Table[Flatten[Position[GCD[Table[Mod[j, w], {j, 1, w-1}], w], 1]], {w, 1, 100}], 2]
    row[n_]:=Select[Range[n],GCD[n,#]==1 &]; Array[row,17]//Flatten (* Stefano Spezia, Jul 20 2025 *)
  • PARI
    first(n)=my(v=List(),i,j);while(iCharles R Greathouse IV, Feb 07 2013
    
  • PARI
    row(n) = select(x->gcd(n, x)==1, [1..n]); \\ Michel Marcus, May 05 2020
    
  • SageMath
    def aRow(n):
        if n == 1: return 1
        return [k for k in ZZ(n).coprime_integers(n+1)]
    print(flatten([aRow(n) for n in range(1, 18)])) # Peter Luschny, Aug 17 2020

Formula

The n-th "clump" consists of the phi(n) integers <= n and prime to n.
a(n) = A002260(A169581(n)). - Reinhard Zumkeller, Dec 02 2009
a(n+1) = A020652(n) for n > 1. - Georg Fischer, Oct 27 2020

Extensions

More terms from Erich Friedman
Offset corrected by Max Alekseyev, Apr 26 2010

A093600 Numerator of Sum_{1<=k<=n, gcd(k,n)=1} 1/k.

Original entry on oeis.org

1, 1, 3, 4, 25, 6, 49, 176, 621, 100, 7381, 552, 86021, 11662, 18075, 91072, 2436559, 133542, 14274301, 5431600, 9484587, 2764366, 19093197, 61931424, 399698125, 281538452, 8770427199, 1513702904, 315404588903, 323507400, 9304682830147
Offset: 1

Views

Author

T. D. Noe, Apr 03 2004

Keywords

Comments

The divisibility properties of this sequence are given by Leudesdorf's theorem.
Problem: are there numbers n > 1 such that n^4 | a(n)? Let b(n) be the numerator of Sum_{1<=k<=n, gcd(k,n)=1} 1/k^2. Conjecture: if, for some e > 0, n^e | a(n), then n^(e-1) | b(n). It appears that, for any odd number n, n^e | a(n) if and only if n^(e-1) | b(n). - Thomas Ordowski, Aug 12 2019

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 4th ed., Oxford Univ. Press, 1971, page 100. [3rd. ed., Theorem 128, page 101]

Crossrefs

Cf. A069220 (denominator of this sum), A001008 (numerator of the n-th harmonic number).

Programs

  • Magma
    [Numerator(&+[1/k:k in [1..n]|Gcd(k,n) eq 1]):n in [1..31]]; // Marius A. Burtea, Aug 14 2019
  • Mathematica
    Table[s=0; Do[If[GCD[i, n]==1, s=s+1/i], {i, n}]; Numerator[s], {n, 1, 35}]
  • PARI
    for (n=1, 40, print1(numerator(sum(k=1, n, if (gcd(k, n)==1, 1/k))), ", ")) \\ Seiichi Manyama, Aug 11 2017
    

Formula

G.f. A(x) (for fractions) satisfies: A(x) = -log(1 - x)/(1 - x) - Sum_{k>=2} A(x^k)/k. - Ilya Gutkovskiy, Mar 31 2020

A111879 Numerators of array which counts positive rational numbers (not including natural numbers).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 1, 2, 3, 4, 5, 1, 3, 5, 1, 2, 4, 5, 7, 1, 3, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 5, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 3, 5, 9, 11, 1, 2, 4, 7, 8, 11, 13, 1, 3, 5, 7, 9, 11, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 5, 7, 11, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Offset: 3

Views

Author

Wolfdieter Lang, Aug 23 2005

Keywords

Comments

Denominators are given by A111880.
The sequence of row lengths is [1, 1, 3, 1, 5, 3, 5, 3, 9, 3, 11, 5, 7, 7, ...] = A000010(n)-1 = phi(n)-1, with Euler's totient function phi(n).
For n>=3 delete from the list [seq(j/n-j,j=1..n-2)] the natural numbers and the ratios p/q with (p,q) not 1 (p and q not relatively prime, i.e., p and q have a common divisor >1).

Examples

			Triangle begins:
  [1],
  [1],
  [1, 2, 3],
  [1],
  [1, 2, 3, 4, 5],
  [1, 3, 5],
  [1, 2, 4, 5, 7],
  [1, 3, 7],
  ...
The corresponding ratios are:
  [1/2],
  [1/3],
  [1/4, 2/3, 3/2],
  [1/5],
  [1/6, 2/5, 3/4, 4/3, 5/2],
  [1/7, 3/5, 5/3],
  [1/8, 2/7, 4/5, 5/4, 7/2],
  [1/9, 3/7, 7/3],
  ...
		

References

  • P. Dienes, The Taylor Series, Dover 1957, p. 8, eq.(1).

Crossrefs

Row sums give A111881(n)/A069220(n), n>=3, see the W. Lang link.
Cf. A020652/A020653 if natural numbers are included.
Cf. A111880.

Formula

a(n, k) = numerator(r(n, k)), n>=3, k=1..phi(n)-1, with phi(n) = A000010(n) (Euler's totient function) and the ratios r(n, k) defined for row n above.

A111881 Numerators of row sums of array of ratios A111879(n,k)/A111880(n,k).

Original entry on oeis.org

1, 1, 29, 1, 103, 253, 1669, 181, 30791, 849, 452993, 41003, 94949, 421117, 18358463, 446801, 124184839, 30064511, 80932487, 19812817, 211524139, 333707681, 4757207109, 2557825027, 105920383973, 14417396537, 4649180818987
Offset: 3

Views

Author

Wolfdieter Lang, Aug 23 2005

Keywords

Examples

			The ratios a(n)/A069220(n) are: 1/2, 1/3, 29/12, 1/5, 103/20, 253/105, 1669/280, 181/63, 30791/2520, 849/385, ... (see the W. Lang link under A111879.)
		

Crossrefs

The denominators are given in A069220(n), n>=3.

Formula

a(n) = numerator(Sum_{k=1..phi(n)-1} r(n, k)), with phi(n) = A000010(n) (Euler's totient function) and the ratios r(n, k) = A111879(n, k)/A111880(n, k).

A111992 Numerators of row sums of array of rationals A038566(n)/A020653(n), n>=2.

Original entry on oeis.org

1, 5, 10, 77, 26, 223, 988, 3909, 748, 55991, 5084, 785633, 124658, 207061, 1096792, 29889983, 1893246, 197698279, 85352744, 154834887, 47589202, 325333835, 1188897016, 7612795845, 5775510652, 183259245573, 33778670612
Offset: 2

Views

Author

Wolfdieter Lang, Sep 12 2005

Keywords

Comments

Denominators are given by A069220.
See the W. Lang link under A038566 for the rationals and more.

Examples

			Rationals a(n)/A038566(n): [1, 5/2, 10/3, 77/12, 26/5, 223/20,
988/105, 3909/280, 748/63, 55991/2520,...]
		

Formula

a(n)=numerator(sum(r(n, k), k=1..phi(n))), with phi(n)=A000010(n) (Euler's totient function) and r(n, k):=A038566(n,k)/A020653(n,k), n>=2, if A020653 is read as an irregular triangle.
Showing 1-5 of 5 results.