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 11 results. Next

A084587 Integer floor of the reciprocal of Gauss-Kuzmin distribution of n: a(n) = floor( log(2)/log(1 + 1/(n*(n+2))) ).

Original entry on oeis.org

2, 5, 10, 16, 24, 33, 44, 55, 68, 83, 99, 116, 135, 155, 177, 199, 224, 249, 276, 305, 335, 366, 398, 432, 468, 504, 543, 582, 623, 665, 709, 754, 800, 848, 897, 948, 1000, 1053, 1108, 1164, 1222, 1281, 1341, 1403, 1466, 1530, 1596, 1663, 1732, 1802, 1873, 1946
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

Programs

  • PARI
    for(n=1,100,a=floor(log(2)/log(1+1/(n*(n+2)))); print1(a,","))

Formula

a(n) = (n^2 + 2n)*log(2) + O(1). - Charles R Greathouse IV, Sep 04 2015

A084580 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of k in order by n.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Comments

The geometric mean of the sequence equals Khintchine's constant K=2.685452001 = A002210 since the frequency of the integers agrees with the Gauss-Kuzmin distribution. When considered as a continued fraction, the resulting constant is 0.5815803358828329856145... = A372869 = [0;1,1,2,1,1,3,2,1,1,1,4,2,1,...].
This can also be defined as the sequence formed by greedily sampling the Gauss-Kuzmin distribution. - Jwalin Bhatt, Nov 28 2024

Examples

			From _Jwalin Bhatt_, Jul 25 2025: (Start)
Constructing the sequence by greedily sampling the Gauss-Kuzmin distribution to minimize discrepancy.
Let p(n) denote the probability of n and c(n) denote the count of occurrences of n so far.
We take the ratio of the actual occurrences c(n)+1 to the probability and pick the one with the lowest value.
Since p(n) is monotonic decreasing, we only need to compute c(n) once we see c(n-1).
  | n | (c(1)+1)/p(1) | (c(2)+1)/p(2) | (c(3)+1)/p(3) | choice |
  |---|---------------|---------------|---------------|--------|
  | 1 |     5.884     |       -       |       -       |   1    |
  | 2 |     4.818     |     5.884     |       -       |   1    |
  | 3 |     7.228     |     5.884     |       -       |   2    |
  | 4 |     7.228     |    11.769     |    10.740     |   1    |
  | 5 |     9.637     |    11.769     |    10.740     |   1    |
  | 6 |    12.047     |    11.769     |    10.740     |   3    | (End)
		

Crossrefs

Programs

  • Mathematica
    pdf[k_] := Log[1 + 1/(k*(k + 2))]/Log[2]
    samplePDF[numCoeffs_] := Module[
      {coeffs = {}, counts = {0}, minTime, minIndex, time},
    Do[
        minTime = Infinity;
        Do[
          time = (counts[[i]] + 1)/pdf[i];
          If[time < minTime, minIndex = i; minTime = time],
          {i, 1, Length[counts]}
        ];
        If[minIndex == Length[counts], AppendTo[counts, 0]];
        counts[[minIndex]] += 1;
        AppendTo[coeffs, minIndex],
        {numCoeffs}
      ];
      coeffs
    ]
    A084580 = samplePDF[120]  (* Jwalin Bhatt, Jul 25 2025 *)
  • Python
    import math
    def sample_gauss_kuzmin_distribution(num_coeffs):
      coeffs, counts = [], [0]
      for _ in range(num_coeffs):
        min_time = math.inf
        for i, count in enumerate(counts, start=1):
          time = (count+1) / -math.log2(1-(1/((i+1)**2)))
          if time < min_time:
            min_index, min_time = i, time
        if min_index == len(counts):
          counts.append(0)
        counts[min_index-1] += 1
        coeffs.append(min_index)
      return coeffs
    A084580 = sample_gauss_kuzmin_distribution(100) # Jwalin Bhatt, Dec 22 2024

A084582 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of n when k=2.

Original entry on oeis.org

3, 7, 12, 16, 21, 27, 31, 36, 41, 47, 51, 58, 63, 67, 74, 78, 84, 89, 95, 99, 106, 110, 116, 123, 127, 133, 137, 142, 149, 156, 160, 166, 170, 177, 183, 187, 192, 199, 205, 210, 216, 221, 227, 232, 236, 243, 249, 256, 259, 265, 270, 278, 284, 287, 294, 297, 305
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084577 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of floor(y) in order by n.

Original entry on oeis.org

2, 4, 5, 7, 9, 10, 11, 12, 14, 16, 16, 17, 19, 21, 21, 23, 24, 24, 26, 28, 29, 31, 32, 33, 33, 33, 35, 36, 38, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 50, 52, 53, 53, 55, 55, 57, 58, 60, 62, 64, 64, 65, 67, 67, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 79, 81, 82, 83, 84, 84, 85
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Comments

Missing positive integers are found in A084578.

Crossrefs

A084578 Positive integers not found in A084577.

Original entry on oeis.org

1, 3, 6, 8, 13, 15, 18, 20, 22, 25, 27, 30, 34, 37, 39, 46, 51, 54, 56, 59, 61, 63, 66, 71, 78, 80, 87, 90, 92, 95, 97, 102, 104, 109, 112, 114, 119, 121, 124, 126, 131, 133, 136, 138, 140, 143, 145, 148, 157, 160, 162, 165, 174, 179, 181, 184, 189, 191, 208, 210, 213
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084579 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of m in order by n.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 2, 5, 6, 7, 1, 3, 8, 2, 9, 4, 10, 1, 11, 12, 5, 13, 3, 1, 14, 2, 6, 15, 16, 17, 7, 4, 18, 1, 19, 8, 20, 2, 21, 3, 9, 22, 5, 23, 1, 24, 10, 25, 26, 6, 11, 27, 2, 28, 4, 1, 29, 12, 30, 3, 31, 7, 13, 32, 33, 34, 14, 1, 35, 5, 8, 36, 2, 15, 37, 38, 39, 16, 40, 9, 4, 41, 1, 17, 3
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084581 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of n when k=1.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 13, 15, 17, 19, 20, 22, 25, 28, 29, 30, 33, 35, 37, 39, 42, 44, 46, 48, 49, 52, 54, 57, 59, 61, 64, 65, 66, 69, 72, 75, 76, 77, 79, 82, 86, 88, 90, 92, 93, 96, 97, 100, 103, 104, 107, 108, 111, 113, 115, 119, 122, 124, 125, 126, 129, 131, 134, 136
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084584 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of n when k=4.

Original entry on oeis.org

11, 26, 40, 55, 70, 87, 102, 118, 132, 148, 164, 180, 195, 213, 228, 245, 260, 276, 292, 308, 326, 342, 355, 375, 391, 407, 421, 439, 454, 473, 487, 505, 521, 536, 552, 568, 587, 602, 615, 636, 650, 669, 684, 699, 718, 732, 750, 767, 783, 802, 816, 831, 849
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084585 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of n when k=5.

Original entry on oeis.org

18, 38, 60, 81, 105, 128, 152, 172, 196, 219, 242, 266, 289, 313, 337, 358, 385, 408, 431, 453, 479, 500, 525, 549, 574, 597, 617, 644, 671, 691, 716, 738, 762, 789, 811, 834, 858, 884, 908, 929, 956, 977, 1002, 1023, 1052, 1075, 1096
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

A084586 Let y = m/GK(k), where m and k vary over the positive integers and GK(k)=log(1+1/(k*(k+2)))/log(2) is the Gauss-Kuzmin distribution of k. Sort the y values by size and number them consecutively by n. This sequence gives the values of n when k=6.

Original entry on oeis.org

24, 53, 85, 114, 146, 178, 209, 240, 273, 306, 338, 370, 401, 434, 467, 498, 531, 563, 596, 629, 660, 692, 724, 759, 793, 822, 856, 889, 921, 955, 987, 1018, 1056, 1085
Offset: 1

Views

Author

Paul D. Hanna, May 31 2003

Keywords

Crossrefs

Showing 1-10 of 11 results. Next