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.

A020475 a(n) is the number of k for which binomial(n,k) is divisible by n.

This page as a plain text file.
%I A020475 #49 May 07 2025 02:18:41
%S A020475 0,2,1,2,2,4,2,6,4,6,6,10,5,12,6,8,8,16,10,18,10,14,14,22,10,20,18,18,
%T A020475 14,28,11,30,16,26,30,26,22,36,30,30,22,40,20,42,26,26,30,46,20,42,34,
%U A020475 32,34,52,26,46,33,50,42,58,26,60,30,46,32,50,48,66,58,50,44,70,40,72,66,46,58
%N A020475 a(n) is the number of k for which binomial(n,k) is divisible by n.
%C A020475 Note that n is prime iff a(n) = n-1. - _T. D. Noe_, Feb 23 2006
%C A020475 a(n) >= phi(n) (cf. Robbins). - _Michel Marcus_, Oct 31 2012
%C A020475 For n > 0: number of zeros in n-th row of A053200. - _Reinhard Zumkeller_, Jan 01 2013
%C A020475 binomial(n, k) / binomial(n, k-1) = k / (n - k + 1) which eases computation. - _David A. Corneth_, May 04 2025
%H A020475 David A. Corneth, <a href="/A020475/b020475.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from T. D. Noe)
%H A020475 H. Harborth, <a href="http://www.jstor.org/stable/2318304">Divisibility of binomial coefficients by their row number</a>, The American Mathematical Monthly, Vol. 84, No. 1 (Jan., 1977), pp. 35-37.
%H A020475 N. Robbins, <a href="http://dx.doi.org/10.4153/CMB-1982-052-3">On the number of binomial coefficients which are divisible by their row number</a>, Canad. Math. Bull. 25(1982), 363-365.
%H A020475 N. Robbins, <a href="http://dx.doi.org/10.4153/CMB-1985-059-0">On the number of binomial coefficients which are divisible by their row number. II</a>, Canad. Math. Bull. 28(1985), 481-486.
%H A020475 David A. Corneth, <a href="/A020475/a020475_1.gp.txt">PARI program</a>
%F A020475 a(n) = n + 1 - A007012(n). - _T. D. Noe_, Feb 23 2006
%e A020475 From _David A. Corneth_, May 04 2025: (Start)
%e A020475 a(6) = 2 as binomial(6, k) = 1, 6, 15, 20, 15, 6, 1 for k = 0 through 6 respectively. Among these, a(6) = 2 numbers are divisible by 6.
%e A020475 a(12) = 5. We start at 1 and know that 12 = 2^2 * 3^1 and so the valuation of 2 and 3 are 2 and 1 respectively.
%e A020475 We compute binomial(n, k) / binomial(n, k-1) = k / (n - k + 1) for k = 1 through floor((n-1)/2) = 3 and keep track the valuation of 2 and 3 of binomial(n, k) via this telescoping product.
%e A020475 We get (2, 1), (1, 1), (2, 0), (0, 2), (3, 2). Of them (2, 1) and (3, 2) indicate divisibility by 12 so that's two numbers and four via symmetry. For binomial(12, 6) we get (2, 1) which as symmetry doesn't give two solutions only counts towards one value of k. This gives a total 4+1 = 5 for a(12). (End)
%t A020475 Table[cnt=0; Do[If[Mod[Binomial[n,k],n]==0, cnt++ ], {k,0,n}]; cnt,{n,0,100}] (* _T. D. Noe_, Feb 23 2006 *)
%t A020475 Join[{0},Table[Count[Table[Binomial[n,k],{k,0,n}],_?(Mod[#,n]==0&)],{n,100}]] (* _Harvey P. Dale_, Sep 20 2024 *)
%o A020475 (Haskell)
%o A020475 a020475 n = a020475_list !! n
%o A020475 a020475_list = 0 : map (sum . map (0 ^)) (tail a053200_tabl)
%o A020475 -- _Reinhard Zumkeller_, Jan 24 2014
%o A020475 (PARI) apply( A020475(n)=sum(k=0,n, binomial(n,k)%n==0), [1..30]) \\ _M. F. Hasler_, May 04 2025
%o A020475 (PARI) \\ See Corneth link
%Y A020475 Cf. A007012.
%K A020475 nonn
%O A020475 0,2
%A A020475 _David W. Wilson_
%E A020475 More terms from _T. D. Noe_, Feb 23 2006