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-3 of 3 results.

A003016 Number of occurrences of n as an entry in rows <= n of Pascal's triangle (A007318).

Original entry on oeis.org

0, 3, 1, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 2, 2, 4, 2, 2, 2, 2, 3, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Keywords

Comments

Or, number of occurrences of n as a binomial coefficient. [Except for 1 which occurs infinitely many times. This is the only reason for the restriction "row <= n" in the definition. Any other number can only appear in rows <= n. - M. F. Hasler, Feb 16 2023]
Sequence A138496 gives record values and where they occur. - Reinhard Zumkeller, Mar 20 2008
Singmaster conjectures that this sequence is bounded. - Michael J. Hardy, Jun 09 2025

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 93, #47.
  • C. S. Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 96.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a003016 n = sum $ map (fromEnum . (== n)) $
                          concat $ take (fromInteger n + 1) a007318_tabl
    -- Reinhard Zumkeller, Apr 12 2012
    
  • Mathematica
    a[0] = 0; t = {{1}}; a[n_] := Count[ AppendTo[t, Table[ Binomial[n, k], {k, 0, n}]], n, {2}]; Table[a[n], {n, 0, 101}] (* Jean-François Alcover, Feb 20 2012 *)
  • PARI
    {A003016(n)=if(n<4, [0,3,1,2][n+1], my(c=2, k=2, r=sqrtint(2*n)+1, C=r*(r-1)/2); until(, while(C= r\2 && break; C *= r-k; C \= r; r -= 1); c)} \\ M. F. Hasler, Feb 16 2023
    
  • Python
    from math import isqrt # requires python3.8 or higher
    def A003016(n):
        if n < 4: return[0,3,1,2][n]
        cnt = k = 2; r = isqrt(2*n)+1; C = r*(r-1)//2
        while True:
           while C < n and k < r//2:
              C *= r-k; k += 1; C //= k
           if C == n: cnt += 2 - (r == 2*k)
           if k >= r//2: return cnt
           C *= r-k; C //= r; r -= 1 # M. F. Hasler, Feb 16 2023

Extensions

More terms from Erich Friedman
Edited by N. J. A. Sloane, Nov 18 2007, at the suggestion of Max Alekseyev

A059233 Number of rows in which n appears in Pascal's triangle A007318.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Fabian Rothelius, Jan 20 2001

Keywords

Comments

Central binomial coefficients c = A000984(n) > 1 appear once in the middle column C(2n, n), and thereafter in one or more later rows to the left as C(r,k) and to the right as C(r, r-k), k < r/2; the last time in row r = c = C(c,1) = C(c,c-1). For these, a(n) = (A003016(n)+1)/2. For all other numbers n > 1, a(n) = A003016(n)/2. - M. F. Hasler, Mar 01 2023

Examples

			6 appears in both row 4 and row 6 in Pascal's triangle, therefore a(6) = 2.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 93, #47.
  • C. S. Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 96.

Crossrefs

Programs

  • Haskell
    a059233 n = length $ filter (n `elem`) $
                                take (fromInteger n) $ tail a007318_tabl
    a059233_list = map a059233 [2..]
    -- Reinhard Zumkeller, Dec 24 2012
    
  • Mathematica
    nmax = 101; A007318 = Table[Binomial[n, k], {n, 0, nmax}, {k, 0, n}]; a[n_] := Position[A007318, n][[All, 1]] // Union // Length; Table[a[n], {n, 2, nmax}] (* Jean-François Alcover, Sep 09 2013 *)
  • PARI
    A059233(n)=A003016(n)\/2 \\ M. F. Hasler, Mar 01 2023

Formula

a(A180058(n)) = n and a(m) < n for m < A180058(n); a(A182237(n)) = 2; a(A098565(n)) = 3. - Reinhard Zumkeller, Dec 24 2012
a(n) = ceiling(A003016(n)/2). - M. F. Hasler, Mar 01 2023

A376866 a(n) = smallest integer k >= 2 such that there exist n disjoint multisets of positive integers, whose corresponding multinomial coefficients equal k.

Original entry on oeis.org

2, 6, 120, 3003, 433866230594439538896000
Offset: 1

Views

Author

Pontus von Brömssen, Oct 07 2024

Keywords

Examples

			  n |                     a(n) | disjoint multisets with multinomial coefficient a(n)
  --+--------------------------+---------------------------------------------
  1 |                        2 | {1,1}
  2 |                        6 | {2,2}, {1,5}
  3 |                      120 | {3,7}, {2,14}, {1,119}
  4 |                     3003 | {6,8}, {5,10}, {2,76}, {1,3002}
  5 | 433866230594439538896000 | {4,9,13,23}, {2,2,8,11,27}, {3,3,3,16,25}, {5,6,15,24},
    |                          | {1,433866230594439538895999}
		

Crossrefs

Extensions

Edited by Max Alekseyev, May 18 2025
Showing 1-3 of 3 results.