A024791 Number of 7's in all partitions of n.
0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 16, 23, 32, 45, 61, 84, 112, 151, 199, 263, 342, 446, 574, 739, 943, 1201, 1518, 1917, 2404, 3010, 3749, 4661, 5766, 7122, 8759, 10753, 13153, 16059, 19544, 23743, 28759, 34774, 41938, 50491, 60642, 72718, 87004, 103934, 123908
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
- David Benson, Radha Kessar, and Markus Linckelmann, Hochschild cohomology of symmetric groups in low degrees, arXiv:2204.09970 [math.GR], 2022.
Programs
-
Maple
b:= proc(n, i) option remember; local g; if n=0 or i=1 then [1, 0] else g:= `if`(i>n, [0$2], b(n-i, i)); b(n, i-1) +g +[0, `if`(i=7, g[1], 0)] fi end: a:= n-> b(n, n)[2]: seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Mathematica
<< DiscreteMath`Combinatorica`; Table[ Count[ Flatten[ Partitions[n]], 7], {n, 1, 52} ] Table[Count[Flatten[IntegerPartitions[n]],7],{n,55}] (* Harvey P. Dale, Feb 26 2015 *) b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 7, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
-
PARI
x='x+O('x^50); concat([0, 0, 0, 0, 0, 0], Vec(x^7/(1 - x^7) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017
Formula
a(n) ~ exp(Pi*sqrt(2*n/3)) / (14*Pi*sqrt(2*n)) * (1 - 85*Pi/(24*sqrt(6*n)) + (85/48 + 4873*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^7/(1 - x^7) * Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Apr 06 2017
Comments