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.

A058084 Smallest m such that binomial(m,k) = n for some k.

This page as a plain text file.
%I A058084 #44 Aug 23 2025 16:31:32
%S A058084 0,2,3,4,5,4,7,8,9,5,11,12,13,14,6,16,17,18,19,6,7,22,23,24,25,26,27,
%T A058084 8,29,30,31,32,33,34,7,9,37,38,39,40,41,42,43,44,10,46,47,48,49,50,51,
%U A058084 52,53,54,11,8,57,58,59,60,61,62,63,64,65,12,67,68,69,8,71,72,73,74,75,76
%N A058084 Smallest m such that binomial(m,k) = n for some k.
%C A058084 Index of first row of Pascal's triangle (A007318) containing n.
%H A058084 Pontus von Brömssen, <a href="/A058084/b058084.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe, with 3 corrections).
%F A058084 a(A006987(n)) < A006987(n); a(A137905(n)) = A137905(n). - _Reinhard Zumkeller_, Mar 20 2009
%F A058084 A007318(a(n), A357327(n)) = n. - _Pontus von Brömssen_, Sep 24 2022
%e A058084 a(28)=8 because 28 is first found in row 8 of Pascal's triangle (where the first row is counted as 0).
%p A058084 with(combinat): for n from 2 to 150 do flag := 0: for m from 1 to 150 do for k from 1 to m do if binomial(m,k) = n then printf(`%d,`,m); flag := 1; break fi: od: if flag=1 then break fi; od: od:
%t A058084 nmax = 76; t = Table[Binomial[m, k], {m, 0, nmax}, {k, 0, m}]; a[n_] := Position[t, n, 2, 1][[1, 1]]-1; Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, Nov 30 2011 *)
%o A058084 (Haskell)
%o A058084 import Data.List (findIndex); import Data.Maybe (fromJust)
%o A058084 a058084 n = fromJust $ findIndex (elem n) a007318_tabl
%o A058084 -- _Reinhard Zumkeller_, Nov 09 2011
%o A058084 (PARI) a(n) = my(k=0); while (!vecsearch(vector((k+2)\2, i, binomial(k, i-1)), n), k++); k; \\ _Michel Marcus_, Dec 07 2021
%o A058084 (Python)
%o A058084 def A058084(n):
%o A058084     if n == 1: return 0
%o A058084     c = [1]
%o A058084     for m in range(n):
%o A058084         d = [1]
%o A058084         for i in range(m):
%o A058084             a = c[i]+c[i+1]
%o A058084             if a == n:
%o A058084                 return m+1
%o A058084             d.append(a)
%o A058084         c = d+[1] # _Chai Wah Wu_, Aug 23 2025
%Y A058084 Cf. A007318, A006987, A137905, A357327.
%K A058084 nice,nonn,easy,changed
%O A058084 1,2
%A A058084 _Fabian Rothelius_, Nov 25 2000
%E A058084 More terms from _James Sellers_, Nov 27 2000