A382816 a(n) = number of occurrences of n in A008949.
1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2
Keywords
Examples
The numbers in A008949 (partial sums of Pascal's triangle) begin thus: 1 1 2 1 3 4 1 4 7 8 1 5 11 15 16 1 6 16 26 31 32 1 7 22 42 57 63 64 one 2, one 3, two 4's, etc.
Programs
-
Mathematica
t = Flatten[Accumulate/@Table[Binomial[n, i], {n, 0, 200}, {i, 0, n}]]; (* A008949 *) Flatten[Table[Count[t, n], {n, 2, 200}]]
-
PARI
row(n) = my(v=vector(n+1, k, binomial(n,k-1))); vector(#v, k, sum(i=1, k, v[i])); a(n) = sum (i=1, n+1, #select(x->(x==n), row(i))); \\ Michel Marcus, Apr 13 2025
Comments