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-10 of 93 results. Next

A169581 Positions in A002260(n) and A002024(n) when canonically enumerating A038566(n)/A038567(n), the positive rational numbers <= 1.

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 11, 12, 13, 14, 16, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 35, 37, 38, 40, 41, 43, 44, 46, 48, 52, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 71, 73, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96, 100, 102, 104, 106, 107, 109, 112, 113
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 02 2009

Keywords

Comments

A038566(n) = A002260(a(n)); A038567(n) = A002024(a(n));
A054521(a(n)) = 1; complement of A169582.

A054427 Permutation of natural numbers: maps the fractions A038567/A038566 to the right side (n/m > 1) of Stern-Brocot tree.

Original entry on oeis.org

1, 2, 4, 3, 8, 5, 16, 7, 6, 9, 32, 17, 64, 15, 13, 12, 10, 33, 128, 14, 11, 65, 256, 31, 25, 24, 18, 129, 512, 29, 20, 257, 1024, 63, 30, 28, 49, 48, 21, 19, 34, 513, 2048, 26, 23, 1025, 4096, 127, 61, 57, 27, 97, 96, 22, 40, 36, 66, 2049, 8192, 62, 56, 41, 35, 4097
Offset: 1

Views

Author

Keywords

Examples

			Right side of Stern-Brocot tree: 1/1 2/1 3/2 3/1 4/3 5/3 5/2 4/1 5/4 7/5 8/5 7/4 7/3 8/3 7/2 5/1
A038567/A038566: 1/1 2/1 3/1 3/2 4/1 4/3 5/1 5/2 5/3 5/4 6/1 6/5 7/1 7/2 7/3 7/4
		

Crossrefs

Inverse permutation: A054428.

Programs

  • Maple
    A038567_A038566_to_SternBrocot_permutation := proc(u) local a,n,i; a := []; for n from 1 to u do for i from 1 to n do if (1 = igcd(n,i)) then a := [op(a),cfrac2binexp(convert((n/i),confrac))+1]; fi; od; od; RETURN(a); end; # cfrac2binexp given in A054424.

A132587 Let b(k) be the k-th term of the flattened irregular array where the m-th row contains the positive divisors of m. (b(k) = A027750(k).) Let c(k) be the k-th term of the flattened irregular array where the m-th row contains the positive integers that are <= m and are coprime to m. (c(k) = A038566(k).) Then a(n) = gcd(b(n),c(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 5, 1, 1, 1, 1, 1, 3, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 1, 1
Offset: 1

Views

Author

Leroy Quet, Aug 23 2007

Keywords

Examples

			A027750: 1, 1, 2, 1, 3, 1, 2, 4, 1, 5, 1, 2, 3, 6, ...
A038566: 1, 1, 1, 2, 1, 3, 1, 2, 3, 4, 1, 5, 1, 2, ...
The 14th terms of each list are 6 and 2.
So a(14) = gcd(6,2) = 2.
		

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Feb 07 2019

A279067 Least prime q such that (r-q)/(q-p), where pA038566/A038567.

Original entry on oeis.org

5, 11, 29, 37, 6421, 367, 149, 14281, 251, 701, 521, 631, 84913, 127, 331, 75479, 787, 7057, 1949, 3407, 388621, 1847, 1277, 1087, 2879, 1399, 13859, 4621, 43391, 1657, 743507, 40213, 1151, 162209, 1973, 3491, 736577, 2579, 8039, 1264129, 14369, 43691, 4547, 4201, 8147, 29101
Offset: 1

Views

Author

Keywords

Comments

Almost a bisection of A275785 with only the term 5 being in both A279066 & A279067.
The union of A279066 & A279067 is A275785 with only 5 as a common term.
Records: 5, 11, 29, 37, 6421, 14281, 84913, 388621, 743507, 1264129, 1491377, 1613279, 15733451, 27196633, 106132883, 125747441, 304328911, 344278939, 756574061, 1166821769, 2691812749, ..., .
1/n = A179256(n).

Examples

			Row 1:        1/1                          5
Row 2:        1/2                         11
Row 3:     1/3  2/3                   29      37
Row 4:     1/4  3/4                 6421     367
Row 5: 1/5 2/5  3/5 4/5       149  14281     251
Row 6:     1/6  5/6                 521      631
Row 7: 1/7    ..    6/7  84913 127  331    75479   787 7057
Row 8: 1/8 3/8  5/8 7/8       1949 3407   388621  1847
etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2, q = 3, r = 5}, While[(r - q) != n(q - p), p = q; q = r; r = NextPrime@ r]; q]; Farey[n_] := Union@ Flatten@ Table[a/b, {b, n}, {a, 0, b}]; ff = Rest@ Reverse@ Sort[ Farey[25], Denominator[#2] < Denominator[#1] &]; f@# & /@ ff

A308121 Irregular triangle read by rows: T(n,k) = A109395(n)*k-A076512(n)*A038566(n,k).

Original entry on oeis.org

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

Views

Author

Jamie Morken, May 13 2019

Keywords

Comments

Row n has length A000010(n).
Row n > 1 has sum = n*A076512(n)/2.
First value on row(n) = A076511(n).
Last value on row(n) = A076512(n) for n > 1.
For n > 1, A109395(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
x + y = A109395(n), where a = A000010(n) - (b-1).
For n > 2 the penultimate value on row A002110(n) is given by
From Charlie Neder, Jun 05 2019: (Start)
If p is a prime dividing n, then row p*n consists of p copies of row n.
Conjecture: If n is odd, then row 2n can be obtained from row n by interchanging the first and second halves. (End)

Examples

			The sequence as an irregular triangle:
  n/k 1, 2, 3, 4, ...
   1: 0
   2: 1
   3: 1, 2
   4: 1, 1
   5: 1, 2, 3, 4
   6: 2, 1
   7: 1, 2, 3, 4, 5, 6
   8: 1, 1, 1, 1
   9: 1, 2, 1, 2, 1, 2
  10: 3, 4, 1, 2
  11: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  12: 2, 1, 2, 1
  13: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
  14: 4, 5, 6, 1, 2, 3
  15: 7, 14, 13, 4, 11, 2, 1, 8
  ...
  Row sums: 0, 1, 3, 2, 10, 3, 21, 4, 9, 10, 55, 6, 78, 21, 60.
T(14,5) = A109395(14)*5 - A076512(14)*A038566(14,5) = 7*5 - 3*11 = 2.
T(210,2) = A109395(210)*2 - A076512(210)*A038566(210,2) = 35*2 - 8*11 = -18.
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Table[With[{a = n/GCD[n, #], b = Numerator[#/n]}, MapIndexed[a First@ #2 - b #1 &, Flatten@ Position[GCD[Table[Mod[k, n], {k, n - 1}], n], 1] /. {} -> {1}]] &@ EulerPhi@ n, {n, 15}] (* Michael De Vlieger, Jun 06 2019 *)
  • PARI
    vtot(n) = select(x->(gcd(n, x)==1), vector(n, k, k));
    row(n) = my(q = eulerphi(n)/n, v = vtot(n)); vector(#v, k, denominator(q)*k - numerator(q)*v[k]); \\ Michel Marcus, May 14 2019

A132589 a(n) = gcd(A038566(n), n).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 2, 3, 2, 1, 1, 1, 2, 3, 4, 1, 6, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 3, 1, 1, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 5, 1, 1, 1, 1, 5, 1, 2, 1, 4, 5, 2, 1, 8, 1, 10, 1, 4, 1, 2, 5, 16, 1, 1, 1, 1, 1, 17, 1, 2
Offset: 1

Views

Author

Leroy Quet, Aug 23 2007

Keywords

Examples

			a(14) = gcd(A038566(14), 14) = gcd(2,14) = 2.
		

Crossrefs

Formula

a(n) = gcd(A038566(n), n).

Extensions

Edited and extended by Max Alekseyev, Apr 26 2010

A279066 Least prime q such that (q-p)/(r-q), where pA038566/A038567.

Original entry on oeis.org

5, 3, 31, 23, 8123, 89, 139, 7963, 337, 409, 199, 797, 45439, 113, 953, 88547, 293, 2633, 1933, 3643, 137029, 13381, 523, 2861, 1381, 1259, 7621, 7433, 156157, 3089, 546781, 30911, 1951, 294563, 1129, 3229, 285871, 10369, 14221, 3651341, 25819, 3967, 1669, 6173, 23473, 51383
Offset: 1

Views

Author

Keywords

Comments

Almost a bisection of A275785 with only the term 5 being in both A279066 & A279067.
The union of A279066 & A279067 is A275785 with only 5 as a common term.
1/n = A179210(n).
Records: 5, 31, 8123, 45439, 88547, 137029, 156157, 546781, 3651341, 11931613, 16613347, 54636251, 72510257, 102626747, 148379059, 290018137, 847428851, 1165527283, 8232085373, 32592174133, 40113962921, ..., .

Examples

			Row 1:        1/1                                       5
Row 2:        1/2                                       3
Row 3:     1/3  2/3                                 31      23
Row 4:     1/4  3/4                               8123      89
Row 5: 1/5 2/5  3/5 4/5                      139  7963     337    409
Row 6:     1/6  5/6                                199     797
Row 7:    1/7 .. 6/7                   45439 113   953   88547    293   2633
Row 8: 1/8 3/8  5/8 7/8                     1933  3643  137029  13381
etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2, q = 3, r = 5}, While[q != n(r - q) + p, p = q; q = r; r = NextPrime@ r]; q]; Farey[n_] := Union@ Flatten@ Table[a/b, {b, n}, {a, 0, b}]; ff = Rest@ Reverse@ Sort[ Farey[25], Denominator[#2] < Denominator[#1] &]; f@# & /@ ff

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.

A289172 Irregular triangle read by rows: row n lists terms m of A038566(n) such that A001221(m) = A051265(n), with a(1) = 1.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 4, 5, 6, 3, 5, 7, 2, 4, 5, 7, 8, 3, 7, 9, 6, 10, 5, 7, 11, 6, 10, 12, 3, 5, 9, 11, 13, 14, 15, 6, 10, 12, 14, 15, 5, 7, 11, 13, 17, 6, 10, 12, 14, 15, 18, 3, 7, 9, 11, 13, 17, 19, 10, 20, 15, 21, 6, 10, 12, 14, 15, 18, 20, 21, 22, 5, 7, 11
Offset: 1

Views

Author

Michael De Vlieger, Aug 11 2017

Keywords

Comments

Consider A051265(n), the largest value of A001221(m) for 1 <= m <= n such that gcd(m, n) = 1 (i.e., m is in the reduced residue system or RRS of n, or m is a totative of n). Row n of this sequence consists of m in RRS(n) such that omega(m) = A051265(n).

Examples

			Triangle begins:
   n    T(n,m)                        A051265(n)
   1:   1                                     0
   2:   1                                     0
   3:   2                                     1
   4:   3                                     1
   5:   2    3    4                           1
   6:   5                                     1
   7:   6                                     2
   8:   3    5    7                           1
   9:   2    4    5    7    8                 1
  10:   3    7    9                           1
  11:   6   10                                2
  12:   5    7   11                           1
  13:   6   10   12                           2
  14:   3    5    9   11   13                 1
  15:  14                                     2
  16:  15                                     2
  17:   6   10   12   14   15                 2
  18:   5    7   11   13   17                 1
  19:   6   10   12   14   15   18            2
  20:   3    7    9   11   13   17   19       1
		

Crossrefs

Programs

  • Mathematica
    Table[MaximalBy[#, Last][[All, 1]] &@ Map[{#, PrimeNu@ #} &, Cases[Range[n - 1], k_ /; CoprimeQ[n, k]]] /. {} -> {1}, {n, 30}] // Flatten (* Michael De Vlieger, Aug 11 2017 *)

A343634 Number of the fraction which has (the digits of) n as repeating period in its decimal expansion, according to the canonical enumeration A038566/A038567.

Original entry on oeis.org

23, 24, 3, 25, 26, 4, 27, 28, 1, 2951, 23, 327, 2952, 2953, 328, 2954, 2955, 34, 2956, 2957, 329, 24, 2958, 330, 2959, 2960, 35, 2961, 2962, 331, 2963, 2964, 3, 2965, 2966, 36, 2967, 2968, 332, 2969, 2970, 333, 2971, 25, 37, 2972, 2973, 334, 2974, 2975, 335, 2976, 2977, 38, 26
Offset: 1

Views

Author

M. F. Hasler, Oct 18 2021

Keywords

Comments

The fraction f = n/(10^L-1), where L is the number of decimal digits of n, has the infinite decimal expansion 0.{n}{n}{n}... (with special cases n = 9, 99 etc., where f = 0.999... = 1). This sequence lists the index of this fraction, for given n, corresponding to the "canonical enumeration of positive fractions <= 1", i.e., m such that f = A038566(m) / A038567(m-1).
Inspired by Angelini's blog post, which however takes a different approach to encoding fractions (in a more "decimal" way) and to deal with n's made of digits 9 or with repetitions, such as 11, 111, or 1010, etc.

Examples

			a(n = 1) = 23 because A038566(23)/A038567(22) = 1/9, the unique fraction (in lowest terms) whose decimal expansion is 0.111..., i.e., period = (1), repeated.
a(n = 2) = 24 because A038566(24)/A038567(23) = 2/9, the unique fraction (in lowest terms) whose decimal expansion is 0.222..., i.e., period = (2), repeated.
a(n = 3) = 3 because A038566(3)/A038567(2) = 1/3, the unique fraction (in lowest terms) whose decimal expansion is 0.333..., i.e., period = (3), repeated.
a(n = 9) = 1 because A038566(1)/A038567(0) = 1/1, the unique fraction (in lowest terms) equal to 0.999..., i.e., period = (9), repeated.
a(n = 10) = 2951 because A038566(2951)/A038567(2950) = 10/99, the unique fraction (in lowest terms) whose decimal expansion is 0.1010..., i.e., period = (10), repeated.
a(11) = a(1) because the unique fraction that has decimal expansion 0.1111..., i.e., period (11) repeated, is 1/9, the same as for 0.111..., i.e., period (1), repeated.
		

Crossrefs

Programs

  • PARI
    apply( {A343634(n, d=10^(logint(n,10)+1)-1, g=gcd(n,d)) = A002088(d\g-1) - sum(k=1, n\=g, gcd(k, d) > 1) + n}, [1..55])

Formula

a(n) = m such that A038566(m)/A038567(m-1) = n/A002283(A055642(n)), where A002283(1, 2, 3, ...) = (9, 99, 999, ...) and A055642(n) = number of digits of n.
Showing 1-10 of 93 results. Next