login
A052156
Number of compositions of n into 2*j-1 kinds of j's for all j>=1.
7
1, 1, 4, 12, 36, 108, 324, 972, 2916, 8748, 26244, 78732, 236196, 708588, 2125764, 6377292, 19131876, 57395628, 172186884, 516560652, 1549681956, 4649045868, 13947137604, 41841412812, 125524238436, 376572715308, 1129718145924
OFFSET
0,3
COMMENTS
First differences of A025192, also second differences of A000244.
REFERENCES
A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 189, 194-196.
P. Ribenhoim, The Little Book of Big Primes, Springer-Verlag, N.Y., 1991, p. 53.
FORMULA
a(n) = 4*3^(n-2); n >= 2; a(0) = 1; a(1) = 1.
G.f.: (1-x)^2/(1-3*x).
G.f.: 1/(1-sum(j>=1, (2*j-1)*x^j )). - Joerg Arndt, Jul 06 2011
a(n) = 3*a(n-1)+(-1)^n*C(2, 2-n).
a(n) = A003946(n-1), n>0. - R. J. Mathar, Oct 13 2008
a(n) = (-4*n + 9) * a(n-1) + 3 * Sum_{k=1..n-1} a(k) * a(n-k) if n>1. - Michael Somos, Jul 23 2011
a(n) = Sum_{k, 0<=k<=n} A201780(n,k). - Philippe Deléham, Dec 05 2011
EXAMPLE
1 + x + 4*x^2 + 12*x^3 + 36*x^4 + 108*x^5 + 324*x^6 + 972*x^7 + 2916*x^8 + ...
MATHEMATICA
CoefficientList[Series[(1 - x)^2/(1 - 3 x), {x, 0, 40}], x ] (* Vincenzo Librandi, Apr 29 2014 *)
PROG
(PARI) {a(n) = local(A); if( n<1, n==0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (-4*k + 9) * A[k-1] + 3 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Barry E. Williams, Jan 24 2000
EXTENSIONS
New name from Joerg Arndt, Jul 06 2011
STATUS
approved