A210979
Total area of the shadows of the three views of the version "Tree" of the shell model of partitions with n shells.
Original entry on oeis.org
0, 3, 8, 15, 27, 42, 69, 102, 155, 225, 327, 458, 652, 894, 1232, 1669, 2257, 2999, 3996, 5242, 6877, 8928, 11564, 14845, 19045, 24223, 30756, 38815, 48877, 61195, 76496, 95124, 118067, 145930, 179991, 221160, 271268, 331538, 404463, 491948, 597253
Offset: 0
For n = 7 the three views of the shell model of partitions version "tree" with seven shells looks like this:
.
. A194805(7) = 25 A006128(7) = 54
.
. 7 7
. 4 4 3
. 5 5 2
. 3 3 2 2
. 6 1 6 1
. 3 1 3 3 1
. 4 1 4 2 1
. 2 1 2 2 2 1
. 1 5 5 1 1
. 1 3 3 2 1 1
. 4 1 4 1 1 1
. 2 1 2 2 1 1 1
. 1 3 3 1 1 1 1
. 2 1 2 1 1 1 1 1
. 1 1 1 1 1 1 1 1
-------------------------------------------------
.
. 6 3 4 2 1 3 5 4 7
. 3 2 2 1 2 2 3
. 2 1 2
. 1
. 1
. 1
. 1
.
. A194803(7) = 23
.
The areas of the shadows of the three views are A006128(7) = 54, A194803(7) = 23 and A194805(7) = 25, therefore the total area of the three shadows is 54+23+25 = 102, so a(7) = 102.
A340011
Irregular triangle read by rows T(n,k) in which row n lists n blocks, where the m-th block consists of the j-th row of triangle A127093 but with every term multiplied by A000041(m-1), where j = n - m + 1 and 1 <= m <= n.
Original entry on oeis.org
1, 1, 2, 1, 1, 0, 3, 1, 2, 2, 1, 2, 0, 4, 1, 0, 3, 2, 4, 3, 1, 0, 0, 0, 5, 1, 2, 0, 4, 2, 0, 6, 3, 6, 5, 1, 2, 3, 0, 0, 6, 1, 0, 0, 0, 5, 2, 4, 0, 8, 3, 0, 9, 5, 10, 7, 1, 0, 0, 0, 0, 0, 7, 1, 2, 3, 0, 0, 6, 2, 0, 0, 0, 10, 3, 6, 0, 12, 5, 0, 15, 7, 14, 11, 1, 2, 0, 4, 0, 0, 0, 8
Offset: 1
Triangle begins:
[1];
[1, 2], [1];
[1, 0, 3], [1, 2], [2];
[1, 2, 0, 4], [1, 0, 3], [2, 4], [3];
[1, 0, 0, 0, 5], [1, 2, 0, 4], [2, 0, 6], [3, 6], [5];
[...
Row sums give A066186.
Written as an irregular tetrahedron the first five slices are:
--
1;
-----
1, 2,
1;
--------
1, 0, 3,
1, 2,
2;
-----------
1, 2, 0, 4,
1, 0, 3,
2, 4,
3;
--------------
1, 0, 0, 0, 5,
1, 2, 0, 4,
2, 0, 6,
3, 6,
5;
--------------
Row sums give A339106.
The following table formed by four zones shows the correspondence between divisor and parts (n = 1..5):
.
|---|---------|-----|-------|---------|-----------|-------------|
| n | | 1 | 2 | 3 | 4 | 5 |
|---|---------|-----|-------|---------|-----------|-------------|
| P | | | | | | |
| A | | | | | | |
| R | | | | | | |
| T | | | | | | 5 |
| I | | | | | | 3 2 |
| T | | | | | 4 | 4 1 |
| I | | | | | 2 2 | 2 2 1 |
| O | | | | 3 | 3 1 | 3 1 1 |
| N | | | 2 | 2 1 | 2 1 1 | 2 1 1 1 |
| S | | 1 | 1 1 | 1 1 1 | 1 1 1 1 | 1 1 1 1 1 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A181187 | 1 | 3 1 | 6 2 1 | 12 5 2 1 | 20 8 4 2 1 |
| L | | | | |/| | |/|/| | |/|/|/| | |/|/|/|/| |
| I | A066633 | 1 | 2 1 | 4 1 1 | 7 3 1 1 | 12 4 2 1 1 |
| N | | * | * * | * * * | * * * * | * * * * * |
| K | A002260 | 1 | 1 2 | 1 2 3 | 1 2 3 4 | 1 2 3 4 5 |
| | | = | = = | = = = | = = = = | = = = = = |
| | A138785 | 1 | 2 2 | 4 2 3 | 7 6 3 4 | 12 8 6 4 5 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A127093 | 1 | 1 2 | 1 0 3 | 1 2 0 4 | 1 0 0 0 5 |
| |---------|-----|-------|---------|-----------|-------------|
| | A127093 | | 1 | 1 2 | 1 0 3 | 1 2 0 4 |
| |---------|-----|-------|---------|-----------|-------------|
| D | A127093 | | | 1 | 1 2 | 1 0 3 |
| I | A127093 | | | 1 | 1 2 | 1 0 3 |
| V |---------|-----|-------|---------|-----------|-------------|
| I | A127093 | | | | 1 | 1 2 |
| S | A127093 | | | | 1 | 1 2 |
| O | A127093 | | | | 1 | 1 2 |
| R |---------|-----|-------|---------|-----------|-------------|
| S | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A127093 | 1 | 1 2 | 1 0 3 | 1 2 0 4 | 1 0 0 0 5 |
| C | A127093 | | 1 | 1 2 | 1 0 3 | 1 2 0 4 |
| O | - | | | 2 | 2 4 | 2 0 6 |
| N | - | | | | 3 | 3 6 |
| D | - | | | | | 5 |
|---|---------|-----|-------|---------|-----------|-------------|
.
This lower zone of the table is a condensed version of the "divisors" zone.
Cf.
A000070,
A000041,
A002260,
A026792,
A027750,
A058399,
A066633,
A127093,
A135010,
A138121,
A138785,
A176206,
A181187,
A182703,
A207031,
A207383,
A211992,
A221529,
A221530,
A221531,
A221649,
A221650,
A237593,
A245095,
A302246,
A302247,
A336811,
A336812,
A337209,
A338156,
A339106,
A339258,
A339278,
A339304,
A340031,
A340032,
A340035,
A340061.
A340032
Irregular triangle read by rows T(n,k) in which row n lists n blocks, where the m-th block consists of A000041(n-m) copies of the row m of triangle A127093, with 1 <= m <= n.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 1, 2, 1, 0, 3, 1, 1, 1, 1, 2, 1, 2, 1, 0, 3, 1, 2, 0, 4, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 0, 3, 1, 0, 3, 1, 2, 0, 4, 1, 0, 0, 0, 5, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 3, 1, 0, 3, 1, 0, 3, 1, 2, 0, 4, 1, 2, 0, 4, 1, 0, 0, 0, 5, 1, 2, 3, 0, 0, 6
Offset: 1
Triangle begins:
1;
1, 1, 2;
1, 1, 1, 2, 1, 0, 3;
1, 1, 1, 1, 2, 1, 2, 1, 0, 3, 1, 2, 0, 4;
1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 0, 3, 1, 0, 3, 1, 2, 0, 4, 1, 0, 0, 0, 5;
...
Written as an irregular tetrahedron the first five slices are:
1;
--
1,
1, 2;
-----
1,
1,
1, 2,
1, 0, 3;
--------
1,
1,
1,
1, 2,
1, 2,
1, 0, 3,
1, 2, 0, 4;
-----------
1,
1,
1,
1,
1,
1, 2,
1, 2,
1, 2,
1, 0, 3,
1, 0, 3,
1, 2, 0, 4,
1, 0, 0, 0, 5;
--------------
...
The slices of the tetrahedron appear in the upper zone of the following table (formed by three zones) which shows the correspondence between divisors and parts (n = 1..5):
.
|---|---------|-----|-------|---------|-----------|-------------|
| n | | 1 | 2 | 3 | 4 | 5 |
|---|---------|-----|-------|---------|-----------|-------------|
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| | A127093 | | | | | 1 |
| D | A127093 | | | | | 1 |
| I |---------|-----|-------|---------|-----------|-------------|
| V | A127093 | | | | 1 | 1 2 |
| I | A127093 | | | | 1 | 1 2 |
| S | A127093 | | | | 1 | 1 2 |
| O |---------|-----|-------|---------|-----------|-------------|
| R | A127093 | | | 1 | 1 2 | 1 0 3 |
| S | A127093 | | | 1 | 1 2 | 1 0 3 |
| |---------|-----|-------|---------|-----------|-------------|
| | A127093 | | 1 | 1 2 | 1 0 3 | 1 2 0 4 |
| |---------|-----|-------|---------|-----------|-------------|
| | A127093 | 1 | 1 2 | 1 0 3 | 1 2 0 4 | 1 0 0 0 5 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A138785 | 1 | 2 2 | 4 2 3 | 7 6 3 4 | 12 8 6 4 5 |
| | | = | = = | = = = | = = = = | = = = = = |
| L | A002260 | 1 | 1 2 | 1 2 3 | 1 2 3 4 | 1 2 3 4 5 |
| I | | * | * * | * * * | * * * * | * * * * * |
| N | A066633 | 1 | 2 1 | 4 1 1 | 7 3 1 1 | 12 4 2 1 1 |
| K | | | | |\| | |\|\| | |\|\|\| | |\|\|\|\| |
| | A181187 | 1 | 3 1 | 6 2 1 | 12 5 2 1 | 20 8 4 2 1 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| P | | 1 | 1 1 | 1 1 1 | 1 1 1 1 | 1 1 1 1 1 |
| A | | | 2 | 2 1 | 2 1 1 | 2 1 1 1 |
| R | | | | 3 | 3 1 | 3 1 1 |
| T | | | | | 2 2 | 2 2 1 |
| I | | | | | 4 | 4 1 |
| T | | | | | | 3 2 |
| I | | | | | | 5 |
| O | | | | | | |
| N | | | | | | |
| S | | | | | | |
|---|---------|-----|-------|---------|-----------|-------------|
.
The table is essentially the same table of A340035 but here, in the upper zone, every row is A127093 instead of A027750.
Also the above table is the table of A340031 upside down.
Cf.
A000070,
A000041,
A002260,
A026792,
A027750,
A058399,
A066633,
A127093,
A135010,
A138121,
A138785,
A176206,
A181187,
A182703,
A207031,
A207383,
A211992,
A221529,
A221530,
A221531,
A245095,
A221649,
A221650,
A237593,
A302246,
A302247,
A336811,
A337209,
A338156,
A339106,
A339258,
A339278,
A339304,
A340031,
A340061.
A340056
Irregular triangle read by rows T(n,k) in which row n lists n blocks, where the m-th block consists of the divisors of j multiplied by A000041(m-1), where j = n - m + 1 and 1 <= m <= n.
Original entry on oeis.org
1, 1, 2, 1, 1, 3, 1, 2, 2, 1, 2, 4, 1, 3, 2, 4, 3, 1, 5, 1, 2, 4, 2, 6, 3, 6, 5, 1, 2, 3, 6, 1, 5, 2, 4, 8, 3, 9, 5, 10, 7, 1, 7, 1, 2, 3, 6, 2, 10, 3, 6, 12, 5, 15, 7, 14, 11, 1, 2, 4, 8, 1, 7, 2, 4, 6, 12, 3, 15, 5, 10, 20, 7, 21, 11, 22, 15, 1, 3, 9, 1, 2, 4, 8, 2, 14, 3, 6, 9, 18, 5
Offset: 1
Triangle begins:
[1];
[1, 2], [1];
[1, 3], [1, 2], [2];
[1, 2, 4], [1, 3], [2, 4], [3];
[1, 5], [1, 2, 4], [2, 6], [3, 6], [5];
[...
The row sums of triangle give A066186.
Written as an irregular tetrahedron the first five slices are:
1;
-----
1, 2,
1;
-----
1, 3,
1, 2,
2;
--------
1, 2, 4,
1, 3,
2, 4,
3;
--------
1, 5,
1, 2, 4,
2, 6,
3, 6,
5;
--------
The row sums of tetrahedron give A339106.
The slices of the tetrahedron appear in the following table formed by four zones shows the correspondence between divisor and parts (n = 1..5):
.
|---|---------|-----|-------|---------|-----------|-------------|
| n | | 1 | 2 | 3 | 4 | 5 |
|---|---------|-----|-------|---------|-----------|-------------|
| P | | | | | | |
| A | | | | | | |
| R | | | | | | |
| T | | | | | | 5 |
| I | | | | | | 3 2 |
| T | | | | | 4 | 4 1 |
| I | | | | | 2 2 | 2 2 1 |
| O | | | | 3 | 3 1 | 3 1 1 |
| N | | | 2 | 2 1 | 2 1 1 | 2 1 1 1 |
| S | | 1 | 1 1 | 1 1 1 | 1 1 1 1 | 1 1 1 1 1 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A181187 | 1 | 3 1 | 6 2 1 | 12 5 2 1 | 20 8 4 2 1 |
| L | | | | |/| | |/|/| | |/|/|/| | |/|/|/|/| |
| I | A066633 | 1 | 2 1 | 4 1 1 | 7 3 1 1 | 12 4 2 1 1 |
| N | | * | * * | * * * | * * * * | * * * * * |
| K | A002260 | 1 | 1 2 | 1 2 3 | 1 2 3 4 | 1 2 3 4 5 |
| | | = | = = | = = = | = = = = | = = = = = |
| | A138785 | 1 | 2 2 | 4 2 3 | 7 6 3 4 | 12 8 6 4 5 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A027750 | 1 | 1 2 | 1 3 | 1 2 4 | 1 5 |
| |---------|-----|-------|---------|-----------|-------------|
| | A027750 | | 1 | 1 2 | 1 3 | 1 2 4 |
| |---------|-----|-------|---------|-----------|-------------|
| D | A027750 | | | 1 | 1 2 | 1 3 |
| I | A027750 | | | 1 | 1 2 | 1 3 |
| V |---------|-----|-------|---------|-----------|-------------|
| I | A027750 | | | | 1 | 1 2 |
| S | A027750 | | | | 1 | 1 2 |
| O | A027750 | | | | 1 | 1 2 |
| R |---------|-----|-------|---------|-----------|-------------|
| S | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
| | A027750 | | | | | 1 |
|---|---------|-----|-------|---------|-----------|-------------|
.
|---|---------|-----|-------|---------|-----------|-------------|
| | A027750 | 1 | 1 2 | 1 3 | 1 2 4 | 1 5 |
| C | A027750 | | 1 | 1 2 | 1 3 | 1 2 4 |
| O | - | | | 2 | 2 4 | 2 6 |
| N | - | | | | 3 | 3 6 |
| D | - | | | | | 5 |
|---|---------|-----|-------|---------|-----------|-------------|
.
The lower zone is a condensed version of the "divisors" zone.
Cf.
A000070,
A000041,
A002260,
A026792,
A027750,
A058399,
A066633,
A127093,
A135010,
A138121,
A138785,
A176206,
A181187,
A182703,
A207031,
A207383,
A211992,
A221529,
A221530,
A221531,
A245095,
A221649,
A221650,
A237593,
A302246,
A302247,
A336811,
A336812,
A337209,
A338156,
A339106,
A339258,
A339278,
A339304,
A340061.
A144117
Number of Fibonacci parts in the last section of the set of partitions of n.
Original entry on oeis.org
1, 2, 3, 5, 8, 13, 17, 28, 37, 55, 72, 104, 135, 187, 243, 327, 419, 557, 705, 922, 1163, 1494, 1871, 2383, 2960, 3730, 4611, 5754, 7073, 8766, 10710, 13180, 16036, 19600, 23736, 28859, 34788, 42075, 50529, 60811, 72747, 87184, 103907, 124019, 147330
Offset: 1
-
b:= proc(n) option remember; false end: l:= [0, 1]: for k to 100 do b(l[1]):= true; l:= [l[2], l[1]+l[2]] od: aa:= proc(n, i) option remember; local g, h; if n=0 then [1, 0] elif i=0 or n<0 then [0, 0] else g:= aa(n, i-1); h:= aa(n-i, i); [g[1]+h[1], g[2]+h[2] +`if`(b(i), h[1], 0)] fi end: a:= n-> aa(n, n)[2] -aa(n-1, n-1)[2]: seq(a(n), n=1..60); # Alois P. Heinz, Jul 28 2009
-
Clear[b]; b[] = False; l = {0, 1}; For[k = 1, k <= 100, k++, b[l[[1]]] = True; l = {l[[2]], l[[1]] + l[[2]]}]; aa[n, i_] := aa[n, i] = Module[{g, h}, If[n == 0, {1, 0}, If[i == 0 || n < 0, {0, 0}, g = aa[n, i - 1]; h = aa[n - i, i]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + If[b[i], h[[1]], 0]}]]] ; a[n_] := aa[n, n][[2]] - aa[n - 1, n - 1][[2]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jul 30 2015, after Alois P. Heinz *)
Original entry on oeis.org
1, 1, 1, 2, 3, 6, 8, 14, 19, 28, 39, 55, 72, 100, 132, 173, 227, 296, 380, 489, 622, 789, 999, 1254, 1568, 1956, 2433, 3007, 3713, 4564, 5597, 6841, 8344, 10140, 12307, 14880, 17969, 21636, 26012, 31182, 37331, 44582, 53167, 63260, 75170
Offset: 0
The partitions of n = 6 are:
6 ....................... All parts are equal, but included .. (1).
5 + 1 ................... All parts are not equal ............ (2).
4 + 2 ................... All parts are not equal ............ (3).
4 + 1 + 1 ............... All parts are not equal ............ (4).
3 + 3 ................... All parts are equal, not included.
3 + 2 + 1 ............... All parts are not equal ............ (5).
3 + 1 + 1 + 1 ........... All parts are not equal ............ (6).
2 + 2 + 2 ............... All parts are equal, not included.
2 + 2 + 1 + 1 ........... All parts are not equal ............ (7).
2 + 1 + 1 + 1 + 1 ....... All parts are not equal ............ (8).
1 + 1 + 1 + 1 + 1 + 1 ... All parts are equal, not included.
Then a(6) = 8.
Cf.
A000005,
A000009,
A000041,
A000065,
A032741,
A047967,
A111133,
A144300,
A135010,
A138121,
A167930,
A167932,
A167935.
-
b:= proc(n, i, k) option remember;
if n<0 then 0
elif n=0 then `if`(k=0, 1, 0)
elif i=0 then 0
else b(n, i-1, k)+
b(n-i, i, `if`(k<0, i, `if`(k<>i, 0, k)))
fi
end:
a:= n-> 1 +b(n, n-1, -1):
seq(a(n), n=0..50); # Alois P. Heinz, Dec 01 2010
-
a[0] = 1; a[n_] := PartitionsP[n] - DivisorSigma[0, n] + 1; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 08 2016 *)
A182707
Sum of the parts of all partitions of n-1 plus the sum of the emergent parts of the partitions of n.
Original entry on oeis.org
0, 1, 4, 11, 23, 46, 80, 138, 221, 351, 529, 801, 1161, 1685, 2380, 3355, 4624, 6375, 8623, 11658, 15538, 20664, 27163, 35660, 46330, 60082, 77288, 99197, 126418, 160802, 203246, 256381, 321700, 402781, 501962, 624332, 773235, 955776, 1177076, 1446762, 1772308
Offset: 1
For n = 6 the partitions of 6-1=5 are (5);(3+2);(4+1);(2+2+1);(3+1+1);(2+1+1+1);(1+1+1+1+1) and the sum of the parts give 35, the same as 5*7. By other hand the emergent parts of the partitions of 6 are (2+2);(4);(3) and the sum give 11, so a(6) = 35+11 = 46.
A182740
A shell model of partitions as a table of partitions.
Original entry on oeis.org
1, 2, 1, 3, 0, 1, 2, 0, 1, 1, 4, 0, 0, 1, 1
Offset: 1
For the numbers 1..6 the shell model of partitions has 6 shells. The model as a table looks like this:
1 1 1 1 1 1
2 . 1 1 1 1
3 . . 1 1 1
2 . 2 . 1 1
4 . . . 1 1
3 . . 2 . 1
5 . . . . 1
2 . 2 . 2 .
4 . . . 2 .
3 . . 3 . .
6 . . . . .
Then replace the dots by zeros.
Remarks: one number by column, for example 23 is located only in a column, not in two columns.
The table looks like this:
1 1 1 1 1 1
2 0 1 1 1 1
3 0 0 1 1 1
2 0 2 0 1 1
4 0 0 0 1 1
3 0 0 2 0 1
5 0 0 0 0 1
2 0 2 0 2 0
4 0 0 0 2 0
3 0 0 3 0 0
6 0 0 0 0 0
Array begins:
1,1,1,1,1,1,
2,0,1,1,1,
3,0,0,1,
2,0,2,
4,0,
3,
A194448
Number of parts > 1 in the n-th region of the shell model of partitions.
Original entry on oeis.org
0, 1, 1, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 1, 7, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 1, 7, 1, 2, 1, 1, 12, 1, 2, 1, 4, 1, 2, 1, 8, 1, 1, 3, 1, 1, 14, 1, 2, 1, 4, 1, 1, 7, 1, 2, 1, 1, 12, 1, 2, 1, 4, 1, 2, 1, 1, 21, 1, 2, 1, 4, 1, 2
Offset: 1
Written as a triangle:
0;
1;
1;
1,2;
1,2;
1,2,1,4;
1,2,1,4;
1,2,1,4,1,1,7;
1,2,1,4,1,2,1,8;
1,2,1,4,1,1,7,1,2,1,1,12;
1,2,1,4,1,2,1,8,1,1,3,1,1,14;
1,2,1,4,1,1,7,1,2,1,1,12,1,2,1,4,1,2,1,1,21;
Cf.
A000041,
A002865,
A135010,
A138121,
A138137,
A138879,
A186114,
A186412,
A193870,
A194436,
A194437,
A194438,
A194439,
A194446,
A194447,
A194449.
A194544
Total sum of repeated parts in all partitions of n.
Original entry on oeis.org
0, 0, 2, 3, 10, 14, 33, 46, 87, 125, 208, 291, 461, 633, 942, 1292, 1851, 2491, 3484, 4629, 6321, 8326, 11143, 14513, 19168, 24720, 32185, 41193, 53030, 67297, 85830, 108116, 136651, 171040, 214462, 266731, 332197, 410730, 508201, 625082, 768920, 940938
Offset: 0
For n = 6 we have:
--------------------------------------
. Sum of
Partitions repeated parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 6
4 + 2 ...................... 0
2 + 2 + 2 .................. 6
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 6
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
--------------------------------------
Total ..................... 33
So a(6) = 33.
-
b:= proc(n, i) option remember; local h, j, t;
if n<0 then [0, 0]
elif n=0 then [1, 0]
elif i<1 then [0, 0]
else h:= [0, 0];
for j from 0 to iquo(n, i) do
t:= b(n-i*j, i-1);
h:= [h[1]+t[1], h[2]+t[2]+`if`(j<2, 0, t[1]*i*j)]
od; h
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=0..50); # Alois P. Heinz, Nov 20 2011
-
b[n_, i_] := b[n, i] = Module[{h, j, t}, Which [n<0, {0, 0}, n==0, {1, 0}, i<1, {0, 0}, True, h = {0, 0}; For[j=0, j <= Quotient[n, i], j++, t = b[n - i*j, i-1]; h = {h[[1]] + t[[1]], h[[2]] + t[[2]] + If[j<2, 0, t[[1]]* i*j]}]; h]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)
Table[Total[Flatten[Select[Flatten[Split/@IntegerPartitions[n],1], Length[ #]> 1&]]],{n,0,50}] (* Harvey P. Dale, Jan 24 2019 *)
Comments