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.

A382850 a(n) = least k such that binomial(n, k) > binomial(n - 1, h) for 0 <= h <= n - 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31
Offset: 2

Views

Author

Clark Kimberling, Apr 07 2025

Keywords

Comments

All runs appear to have length 2 or 3, with no two consecutive runs of length 3, except for the first two (1, 1, 1; 2, 2, 2). The length of the k-th run of consecutive length-2 runs seems to be close to 0.722*k, but varies irregularly: 1, 2, 2, 4, 3, 5, 5, 7, 6, 8, 8, 9, 9, ... . - Pontus von Brömssen, Apr 15 2025
(Runlength sequence of the runlength sequence) = (2,1,1,2,1,2,1,4,1,3,1,5,...) appears to have 1 in positions given by A004280(n) for n >= 2. - Clark Kimberling, Apr 15 2025

Examples

			The least k such that binomial(5,k) > binomial(4,h) for 0<=h<=4 is 3, since 10 > max{1,4,6}.
		

Crossrefs

Programs

  • Mathematica
    z = 40; c[n_, k_] := Binomial[n, k];
    t[n_] := Table[c[n, k], {k, 0, n}];
    a[n_] := Select[Range[z], c[n, #] > c[n - 1, Floor[(n - 1)/2]] &, 1];
    Flatten[Table[a[n], {n, 1, 3 z}]]  (* A382850 *)
    Flatten[Table[c[n, a[n]], {n, 1, z}]]  (* A382851 *)
  • PARI
    row(n) = vector(n+1, k, binomial(n,k-1));
    a(n) = my(val = vecmax(row(n-1)), w = row(n)); for (i=1, #w, if (w[i] > val, return(i-1));); \\ Michel Marcus, Apr 14 2025
    
  • Python
    from itertools import count
    def A382850_generator():
        k = C0 = C = 1
        for n in count(2):
            C0 = 2*C0 if n%2 == 1 else (n-1)*C0//(n//2) # C(n-1,floor((n-1)/2))
            C = C*n//(n-k) # C(n,k)
            if C <= C0:
                C = C*(n-k)//(k+1)
                k += 1
            yield k # Pontus von Brömssen, Apr 15 2025

Formula

a(n) - a(n-1) is either 0 or 1. - Pontus von Brömssen, Apr 15 2025
Apparently, the lower and upper limits of f(n) = a(n) - n/2 + sqrt(n*log(2)/2) are 0 and 1, respectively, with f(n) < 1 for all n, but with the minimum -0.0144167... of f attained at n = 184. - Pontus von Brömssen, Apr 16 2025