A382850 a(n) = least k such that binomial(n, k) > binomial(n - 1, h) for 0 <= h <= n - 1.
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
Keywords
Examples
The least k such that binomial(5,k) > binomial(4,h) for 0<=h<=4 is 3, since 10 > max{1,4,6}.
Links
- Pontus von Brömssen, Table of n, a(n) for n = 2..10000
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
Comments