A171628 Number of compositions of n such that the smallest part is divisible by the number of parts.
1, 1, 1, 2, 3, 3, 3, 4, 6, 8, 11, 15, 19, 22, 25, 30, 37, 47, 62, 83, 108, 136, 168, 205, 247, 295, 354, 429, 524, 642, 789, 972, 1196, 1466, 1789, 2173, 2625, 3155, 3778, 4515, 5391, 6437, 7692, 9201, 11014, 13186, 15780, 18865, 22516, 26818, 31871, 37791
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..900
Programs
-
Maple
b:= proc(n,t,g) option remember; `if` (n=0, `if` (irem(g, t)=0, 1, 0), add (b(n-i, t+1, min(i, g)), i=1..n)) end: a:= n-> b(n,0,infinity): seq (a(n), n=1..60); # Alois P. Heinz, Dec 15 2009 A171628 := proc(n) local g,k; g := 0 ; for k from 0 to n do g := g+add (x^(k*d)*(1-x^d)/(1-x)^d,d=numtheory[divisors](k)) ; g := expand(g) ; end do ; coeftayl(g,x=0,n) ; end proc: seq(A171628(n),n=1..60) ; # R. J. Mathar, Dec 14 2009
-
Mathematica
b[n_, t_, g_] := b[n, t, g] = If[n == 0, If [Mod[g, t] == 0, 1, 0], Sum[b[n - i, t + 1, Min[i, g]], {i, n}]]; a[n_] := b[n, 0, Infinity]; Array[a, 60] (* Jean-François Alcover, May 23 2020, after Alois P. Heinz *)
Formula
G.f.: Sum_{n>=0} [Sum_{d|n} x^(n*d)*(1-x^d)/(1-x)^d].
Extensions
More terms from R. J. Mathar and Alois P. Heinz, Dec 14 2009