login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268978 Triangle T(n,k) read by rows with 1 <= k <= n: number of entries in the first n rows of Pascal's triangle that are divisible by k. 1

%I #14 Apr 03 2016 10:56:28

%S 1,3,0,6,1,0,10,1,2,0,15,4,3,2,0,21,6,3,2,4,1,28,9,7,3,7,3,0,36,9,9,3,

%T 9,3,6,0,45,16,9,9,10,3,11,4,0,55,22,17,13,10,9,15,4,6,4,66,29,24,16,

%U 18,14,18,6,9,10,0,78,33,30,16,24,18,20,6,9,12

%N Triangle T(n,k) read by rows with 1 <= k <= n: number of entries in the first n rows of Pascal's triangle that are divisible by k.

%C T(n, 1) = A000217(n).

%C T(n, 2) = A051679(n - 1) for n > 0.

%C From _Robert Israel_, Feb 26 2016: (Start)

%C If p is prime, T(n,p) is the number of pairs (i,j) with 0 < i < j < n such that some base-p digit of i exceeds the corresponding base-p digit of j.

%C If p is prime, T(n*p,p) = (p*(p+1)/2)*T(n,p) + p*(p-1)*n*(n-1)/4. (End)

%H Robert Israel, <a href="/A268978/b268978.txt">Table of n, a(n) for n = 1..10011</a> (rows 1 to 141, flattened)

%e Triangle begins:

%e 1

%e 3 0

%e 6 1 0

%e 10 1 2 0

%e 15 4 3 2 0

%e 21 6 3 2 4 1

%e 28 9 7 3 7 3 0

%e 36 9 9 3 9 3 6 0

%e T(5, 2) = 4 because the first five rows of Pascal's triangle have 4 entries divisible by 2: one entry in the third row, and three entries in the fifth row.

%e 1

%e 1 1

%e 1 2 1

%e 1 3 3 1

%e 1 4 6 4 1

%p T:= (n,k) -> numboccur([seq(seq(binomial(m,j) mod k, j=0..m),m=0..n-1)],0):

%p seq(seq(T(n,k),k=1..n),n=1..10); # _Robert Israel_, Feb 26 2016

%o (PARI) T(n, k) = sum(m=0, n-1, sum(j=0, m, (binomial(m,j) % k) == 0)); \\ _Michel Marcus_, Feb 23 2016

%Y Cf. A000217, A051679.

%K nonn,tabl

%O 1,2

%A _Peter Kagey_, Feb 16 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 03:59 EDT 2024. Contains 371696 sequences. (Running on oeis4.)