A260466 Number of integers in Pascal's triangle strictly between 1 and n.
0, 0, 1, 3, 5, 7, 10, 12, 14, 16, 20, 22, 24, 26, 28, 32, 34, 36, 38, 40, 43, 47, 49, 51, 53, 55, 57, 59, 63, 65, 67, 69, 71, 73, 75, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 125, 129, 131, 133, 135, 137, 139, 141
Offset: 1
Keywords
Examples
For n=7, the members of Pascal's triangle strictly between 1 and 7 are C(2,1), C(3,1), C(3,2), C(4,1), C(4,2), C(4,3), C(5,1), C(5,4), C(6,1), and C(6,5). So a(7)=10.
Programs
-
Mathematica
t = 0 * Range[101]; Do[x = Binomial[a, b]; If[1 < x <= 100, t[[x + 1]]++], {a, 100}, {b, a}]; Accumulate@ t (* Giovanni Resta, Aug 16 2015 *)
-
PARI
nbn(n) = {my(nb = 0); for (j=1, n, for (k=1, n, b = binomial(j, k); if ((b>1) && (b<=n), nb++););); nb;} \\ Michel Marcus, Jul 30 2015
Extensions
More terms from Michel Marcus, Jul 30 2015
Comments