login
A136219
Number of terms in rows of irregular triangle A136218.
2
1, 3, 7, 13, 22, 33, 47, 64, 84, 106, 131, 159, 190, 224, 261, 301, 343, 388, 436, 487, 541, 598, 658, 721, 787, 856, 928, 1003, 1081, 1162, 1245, 1331, 1420, 1512, 1607, 1705, 1806, 1910, 2017, 2127, 2240, 2356, 2475, 2597, 2722, 2850, 2981, 3115, 3252
OFFSET
0,2
COMMENTS
A136218 is a triangle where row n+1 is generated from row n by first inserting zeros in row n at positions {[m*(m+7)/6], m>=0} and then taking partial sums, starting with a '1' in row 0.
FORMULA
G.f. A(x) = (1+x+x^2)/(1-x)^3 - [Sum_{n>=0} x^b(n)]/(1-x)^2 where exponents b(n) = A136169(n) satisfy: b(n) = 2*b(n-1) - [(n+1)/3] for n>0 with b(0)=1 and the g.f. of the exponents is B(z) = [1 - z^2*(1+z+z^2)/(1-z^3)^2]/(1-2*z).
EXAMPLE
G.f. A(x) = (1+x+x^2)/(1-x)^3 - (x+x^2+x^3+x^5+x^9+x^16+x^30+x^58+...)/(1-x)^2.
PROG
(PARI) {a(n)=local(A, X=x+x*O(x^n), bd=#binary(2*n), B=(1 - x^2*(1+x+x^2)/(1-x^3+x*O(x^bd))^2 )/(1-2*x)); A=(1+x+x^2)/(1-X)^3 - sum(k=0, bd, x^polcoeff(B, k))/(1-X)^2; polcoeff(A, n)}
CROSSREFS
Sequence in context: A147464 A146058 A155354 * A078582 A051336 A253896
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Dec 23 2007
STATUS
approved