|
|
A024787
|
|
Number of 3's in all partitions of n.
|
|
14
|
|
|
0, 0, 1, 1, 2, 4, 6, 9, 15, 21, 31, 45, 63, 87, 122, 164, 222, 298, 395, 519, 683, 885, 1146, 1475, 1887, 2401, 3050, 3845, 4837, 6060, 7563, 9402, 11664, 14405, 17751, 21807, 26715, 32634, 39784, 48352, 58649, 70969, 85690, 103232, 124143, 148951, 178407, 213277, 254509
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
a(n) is also the difference between the sum of 3rd largest and the sum of 4th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ exp(Pi*sqrt(2*n/3)) / (6*Pi*sqrt(2*n)) * (1 - 37*Pi/(24*sqrt(6*n)) + (37/48 + 937*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^2/((1 - x^3)*(x)_inf), where (q)_inf is the q-Pochhammer symbol (the Euler function). - Vladimir Reshetnikov, Nov 22 2016
G.f.: x^3/((1 - x)*(1 - x^2)*(1 - x^3)) * Sum_{n >= 0} x^(3*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A069905 (partitions into 3 parts, or, modulo offset differences, partitions into parts <= 3) and A008483 (partitions into parts >= 3). - Peter Bala, Jan 17 2021
|
|
EXAMPLE
|
For n = 7 we have:
--------------------------------------
. Number
Partitions of 7 of 3's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 1
6 + 1 .......................... 0
3 + 3 + 1 ...................... 2
4 + 2 + 1 ...................... 0
2 + 2 + 2 + 1 .................. 0
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 1
4 + 1 + 1 + 1 .................. 0
2 + 2 + 1 + 1 + 1 .............. 0
3 + 1 + 1 + 1 + 1 .............. 1
2 + 1 + 1 + 1 + 1 + 1 .......... 0
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
. 13 - 7 = 6
The difference between the sum of the third column and the sum of the fourth column of the set of partitions of 7 is 13 - 7 = 6 and equals the number of 3's in all partitions of 7, so a(7) = 6.
(End)
|
|
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=3, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
|
|
MATHEMATICA
|
Table[ Count[ Flatten[ IntegerPartitions[n]], 3], {n, 1, 50} ]
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==3, 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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|