A176734 a(n) = (n+7)*a(n-1) + (n-1)*a(n-2), a(-1)=0, a(0)=1.
1, 8, 73, 746, 8425, 104084, 1395217, 20157542, 312129649, 5155334720, 90449857081, 1679650774658, 32908313146393, 678322072223756, 14672571587601985, 332293083938376254, 7862829504396683617, 194024597448534426872, 4984283037788104293289, 133083801736564331309210
Offset: 0
Examples
Necklaces and 8 cords problem. For n=4 one considers the following weak 2 part compositions of 4: (4,0), (3,1), (2,2), and (0,4), where (1,3) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively !4*1,binomial(4,3)*!3*c8(1), (binomial(4,2)*!2)*c8(2), and 1*c8(4) with the subfactorials !n:=A000166(n) (see the necklace comment there) and the c8(n):=A049388(n) numbers for the pure 8-cord problem (see the remark on the e.g.f. for the k cords problem in A000153; here for k=8: 1/(1-x)^8). This adds up as 9 + 4*2*8 + (6*1)*72 + 7920 = 8425 = a(4).
Crossrefs
Cf. A176733 (necklaces and k=7 cords).
Programs
-
Mathematica
nxt[{n_,a_,b_}]:={n+1,b,(n+8)b+n*a}; Transpose[NestList[nxt,{1,1,8},20]][[2]] (* Harvey P. Dale, Mar 19 2013 *) Table[(-1)^n HypergeometricPFQ[{9, -n}, {}, 1], {n, 0, 20}] (* Benedict W. J. Irwin, May 29 2016 *)
Formula
E.g.f. (exp(-x)/(1-x))*(1/(1-x)^8) = exp(-x)/(1-x)^9, equivalent to the given recurrence.
a(n) = A086764(n+8,8).
a(n) = (-1)^n*2F0(9,-n;;1). - Benedict W. J. Irwin, May 29 2016
Comments