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.
%I A382850 #21 Apr 18 2025 21:03:39 %S A382850 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, %T A382850 13,14,14,15,15,15,16,16,17,17,18,18,19,19,19,20,20,21,21,22,22,23,23, %U A382850 24,24,25,25,25,26,26,27,27,28,28,29,29,30,30,31,31 %N A382850 a(n) = least k such that binomial(n, k) > binomial(n - 1, h) for 0 <= h <= n - 1. %C A382850 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 %C A382850 (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 %H A382850 Pontus von Brömssen, <a href="/A382850/b382850.txt">Table of n, a(n) for n = 2..10000</a> %F A382850 a(n) - a(n-1) is either 0 or 1. - _Pontus von Brömssen_, Apr 15 2025 %F A382850 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 %e A382850 The least k such that binomial(5,k) > binomial(4,h) for 0<=h<=4 is 3, since 10 > max{1,4,6}. %t A382850 z = 40; c[n_, k_] := Binomial[n, k]; %t A382850 t[n_] := Table[c[n, k], {k, 0, n}]; %t A382850 a[n_] := Select[Range[z], c[n, #] > c[n - 1, Floor[(n - 1)/2]] &, 1]; %t A382850 Flatten[Table[a[n], {n, 1, 3 z}]] (* A382850 *) %t A382850 Flatten[Table[c[n, a[n]], {n, 1, z}]] (* A382851 *) %o A382850 (PARI) row(n) = vector(n+1, k, binomial(n,k-1)); %o A382850 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 %o A382850 (Python) %o A382850 from itertools import count %o A382850 def A382850_generator(): %o A382850 k = C0 = C = 1 %o A382850 for n in count(2): %o A382850 C0 = 2*C0 if n%2 == 1 else (n-1)*C0//(n//2) # C(n-1,floor((n-1)/2)) %o A382850 C = C*n//(n-k) # C(n,k) %o A382850 if C <= C0: %o A382850 C = C*(n-k)//(k+1) %o A382850 k += 1 %o A382850 yield k # _Pontus von Brömssen_, Apr 15 2025 %Y A382850 Cf. A001405, A007318, A382851. %K A382850 nonn %O A382850 2,4 %A A382850 _Clark Kimberling_, Apr 07 2025