A003016 Number of occurrences of n as an entry in rows <= n of Pascal's triangle (A007318).
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
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).
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- H. L. Abbott, P. Erdős and D. Hanson, On the numbers of times an integer occurs as a binomial coefficient, Amer. Math. Monthly, (1974), 256-261.
- Daniel Kane, New Bounds on the Number of Representations of t as a Binomial Coefficient, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper A7, 2004.
- Kaisa Matomäki, Maksym Radziwill, Xuancheng Shao, Terence Tao, and Joni Teräväinen, Singmaster's conjecture in the interior of Pascal's triangle, arXiv:2106.03335 [math.NT], 2021.
- D. Singmaster, How often does an integer occur as a binomial coefficient?, Amer. Math. Monthly, 78 (1971), 385-386.
- Eric Weisstein's World of Mathematics, Pascal's Triangle
- Index entries for triangles and arrays related to Pascal's triangle
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
Comments