A176733 a(n) = (n+6)*a(n-1) + (n-1)*a(n-2), a(-1)=0, a(0)=1.
1, 7, 57, 527, 5441, 61959, 770713, 10391023, 150869313, 2346167879, 38896509881, 684702346767, 12752503850497, 250514001320647, 5176062576469401, 112204510124346479, 2546140161382663553, 60356495873790805383, 1491840283714484609593, 38382424018590349736719
Offset: 0
Examples
Necklaces and 7 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*c7(1), (binomial(4,2)*!2)*c7(2), and 1*c7(4) with the subfactorials !n:=A000166(n) (see the necklace comment there) and the c7(n):=A001730(n+6) numbers for the pure 7-cord problem (see the remark on the e.g.f. for the k-cord problem in A000153; here for k=7: 1/(1-x)^7). This adds up as 9 + 4*2*7 + (6*1)*56 + 5040 = 5441 = a(4).
Links
- Robert Israel, Table of n, a(n) for n = 0..442
Crossrefs
Cf. A176732 (necklaces and k=6 cords).
Programs
-
Maple
f:= proc(n) option remember; (n+6)*procname(n-1) + (n-1)*procname(n-2) end proc: f(-1):= 0: f(0):= 1: map(f, [$0..30]); # Robert Israel, Dec 01 2024
-
Mathematica
Table[(-1)^n HypergeometricPFQ[{8, -n}, {}, 1], {n, 0, 20}] (* Benedict W. J. Irwin, May 29 2016 *)
Formula
E.g.f. (exp(-x)/(1-x))*(1/(1-x)^7) = exp(-x)/(1-x)^8, equivalent to the given recurrence.
a(n) = A086764(n+7,7).
a(n) = (-1)^n*2F0(8,-n;;1). - Benedict W. J. Irwin, May 29 2016
Comments