Search: a237258 -id:a237258
|
|
A002219
|
|
a(n) is the number of partitions of 2n that can be obtained by adding together two (not necessarily distinct) partitions of n.
(Formerly M2574 N1018)
|
|
+10
62
|
|
|
1, 3, 6, 14, 25, 53, 89, 167, 278, 480, 760, 1273, 1948, 3089, 4682, 7177, 10565, 15869, 22911, 33601, 47942, 68756, 96570, 136883, 189674, 264297, 362995, 499617, 678245, 924522, 1243098, 1676339, 2237625, 2988351, 3957525, 5247500, 6895946, 9070144, 11850304
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
See A213074 for Metropolis and Stein's formulas.
|
|
EXAMPLE
|
Here are the seven partitions of 5: 1^5, 1^3 2, 1 2^2, 1^2 3, 2 3, 1 4, 5. Adding these together in pairs we get a(5) = 25 partitions of 10: 1^10, 1^8 2, 1^6 2^2, etc. (we get all partitions of 10 into parts of size <= 5 - there are 30 such partitions - except for five of them: we do not get 2 4^2, 3^2 4, 2^3 4, 1 3^3, 2^5). - N. J. A. Sloane, Jun 03 2012
The a(1) = 1 through a(4) = 14 partitions:
(11) (22) (33) (44)
(211) (321) (422)
(1111) (2211) (431)
(3111) (2222)
(21111) (3221)
(111111) (3311)
(4211)
(22211)
(32111)
(41111)
(221111)
(311111)
(2111111)
(11111111)
(End)
|
|
MAPLE
|
g:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i>1, g(n, i-1), 0)+`if`(i>n, 0, g(n-i, i)))
end:
b:= proc(n, i, s) option remember;
`if`(i=1 and s<>{} or n in s, g(n, i), `if`(i<1 or s={}, 0,
b(n, i-1, s)+ `if`(i>n, 0, b(n-i, i, map(x-> {`if`(x>n-i, NULL,
max(x, n-i-x)), `if`(x<i or x>n, NULL, max(x-i, n-x))}[], s)))))
end:
a:= n-> b(2*n, n, {n}):
|
|
MATHEMATICA
|
b[n_, i_, s_] := b[n, i, s] = If[MemberQ[s, 0 | n], 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, s] + If[i <= n, b[n-i, i, Select[Flatten[Transpose[{s, s-i}]], 0 <= # <= n-i &]], 0]]]]; A006827[n_] := b[2*n, 2*n, {n}]; a[n_] := PartitionsP[2*n] - A006827[n]; Table[Print[an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Nov 12 2013, after Alois P. Heinz *)
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
subptns[s_]:=primeMS/@Divisors[Times@@Prime/@s];
Table[Length[Select[IntegerPartitions[2n], MemberQ[Total/@subptns[#], n]&]], {n, 10}] (* Gus Wiseman, Oct 27 2022 *)
|
|
PROG
|
(Python)
from itertools import combinations_with_replacement
from sympy.utilities.iterables import partitions
def A002219(n): return len({tuple(sorted((p+q).items())) for p, q in combinations_with_replacement(tuple(Counter(p) for p in partitions(n)), 2)}) # Chai Wah Wu, Sep 20 2023
|
|
CROSSREFS
|
A122768 counts distinct submultisets of partitions.
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A006827
|
|
Number of partitions of 2n with all subsums different from n.
(Formerly M1351)
|
|
+10
54
|
|
|
1, 2, 5, 8, 17, 24, 46, 64, 107, 147, 242, 302, 488, 629, 922, 1172, 1745, 2108, 3104, 3737, 5232, 6419, 8988, 10390, 14552, 17292, 23160, 27206, 36975, 41945, 57058, 65291, 85895, 99384, 130443, 145283, 193554, 218947, 281860, 316326, 413322, 454229, 594048
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Partitions of this type are also called non-biquanimous partitions. - Gus Wiseman, Apr 19 2024
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The a(1) = 1 through a(5) = 17 partitions (A = 10):
(2) (4) (6) (8) (A)
(31) (42) (53) (64)
(51) (62) (73)
(222) (71) (82)
(411) (332) (91)
(521) (433)
(611) (442)
(5111) (622)
(631)
(721)
(811)
(3331)
(4222)
(6211)
(7111)
(22222)
(61111)
(End)
|
|
MAPLE
|
b:= proc(n, i, s) option remember;
`if`(0 in s or n in s, 0, `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, s)+
`if`(i<=n, b(n-i, i, select(y-> 0<=y and y<=n-i,
map(x-> [x, x-i][], s))), 0))))
end:
a:= n-> b(2*n, 2*n, {n}):
|
|
MATHEMATICA
|
b[n_, i_, s_] := b[n, i, s] = If[MemberQ[s, 0 | n], 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, s] + If[i <= n, b[n-i, i, Select[Flatten[Transpose[{s, s-i}]], 0 <= # <= n-i &]], 0]]]]; a[n_] := b[2*n, 2*n, {n}]; Table[Print[an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Nov 12 2013, after Alois P. Heinz *)
|
|
PROG
|
(Python)
from itertools import combinations_with_replacement
from collections import Counter
from sympy import npartitions
from sympy.utilities.iterables import partitions
def A006827(n): return npartitions(n<<1)-len({tuple(sorted((p+q).items())) for p, q in combinations_with_replacement(tuple(Counter(p) for p in partitions(n)), 2)}) # Chai Wah Wu, Sep 20 2023
|
|
CROSSREFS
|
These partitions have Heinz numbers A371731.
A371783 counts k-quanimous partitions.
Cf. A035470, A064914, A237258, A305551, A321452, A365543, A365663, A366320, A371736, A371782, A371792.
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A365661
|
|
Triangle read by rows where T(n,k) is the number of strict integer partitions of n with a submultiset summing to k.
|
|
+10
46
|
|
|
1, 1, 1, 1, 0, 1, 2, 1, 1, 2, 2, 1, 0, 1, 2, 3, 1, 1, 1, 1, 3, 4, 2, 2, 1, 2, 2, 4, 5, 2, 2, 2, 2, 2, 2, 5, 6, 3, 2, 3, 1, 3, 2, 3, 6, 8, 3, 3, 4, 3, 3, 4, 3, 3, 8, 10, 5, 4, 5, 4, 3, 4, 5, 4, 5, 10, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 12
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
Rows are palindromic.
Are there only two zeros in the whole triangle?
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1
1 1
1 0 1
2 1 1 2
2 1 0 1 2
3 1 1 1 1 3
4 2 2 1 2 2 4
5 2 2 2 2 2 2 5
6 3 2 3 1 3 2 3 6
8 3 3 4 3 3 4 3 3 8
Row n = 6 counts the following strict partitions:
(6) (5,1) (4,2) (3,2,1) (4,2) (5,1) (6)
(5,1) (3,2,1) (3,2,1) (3,2,1) (3,2,1) (5,1)
(4,2) (4,2)
(3,2,1) (3,2,1)
Row n = 10 counts the following strict partitions:
A 91 82 73 64 532 64 73 82 91 A
64 541 532 532 541 541 541 532 532 541 64
73 631 721 631 631 4321 631 631 721 631 73
82 721 4321 721 4321 4321 721 4321 721 82
91 4321 4321 4321 4321 91
532 532
541 541
631 631
721 721
4321 4321
|
|
MATHEMATICA
|
Table[Length[Select[Select[IntegerPartitions[n], UnsameQ@@#&], MemberQ[Total/@Subsets[#], k]&]], {n, 0, 10}, {k, 0, n}]
|
|
CROSSREFS
|
Columns k = 0 and k = n are A000009.
For subsets instead of partitions we have A365381.
A000124 counts distinct possible sums of subsets of {1..n}.
Cf. A002219, A108796, A108917, A122768, A275972, A299701, A304792, A364916, A365311, A365376, A365541.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A365663
|
|
Triangle read by rows where T(n,k) is the number of strict integer partitions of n without a subset summing to k.
|
|
+10
45
|
|
|
1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 5, 3, 4, 3, 5, 5, 4, 5, 5, 4, 5, 5, 5, 6, 5, 6, 7, 6, 5, 6, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 8, 8, 8, 11, 8, 8, 8, 9, 8, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 12, 13, 11, 13, 11, 12, 15, 12, 11, 13, 11, 13, 12
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,5
|
|
COMMENTS
|
Warning: Do not confuse with the non-strict version A046663.
Rows are palindromes.
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1
1 1
1 2 1
2 2 2 2
2 2 3 2 2
3 3 3 3 3 3
3 4 3 5 3 4 3
5 5 4 5 5 4 5 5
5 6 5 6 7 6 5 6 5
7 7 7 7 7 7 7 7 7 7
8 9 8 8 8 11 8 8 8 9 8
Row n = 8 counts the following strict partitions:
(8) (8) (8) (8) (8) (8) (8)
(6,2) (7,1) (7,1) (7,1) (7,1) (7,1) (6,2)
(5,3) (5,3) (6,2) (6,2) (6,2) (5,3) (5,3)
(4,3,1) (5,3) (4,3,1)
(5,2,1)
|
|
MATHEMATICA
|
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&FreeQ[Total/@Subsets[#], k]&]], {n, 2, 15}, {k, 1, n-1}]
|
|
CROSSREFS
|
Columns k = 0 and k = n are A025147.
The complement for subsets instead of strict partitions is A365381.
A000009 counts subsets summing to n.
A000124 counts distinct possible sums of subsets of {1..n}.
A124506 appears to count combination-free subsets, differences of A326083.
A364350 counts combination-free strict partitions, complement A364839.
Cf. A002219, A108796, A108917, A122768, A275972, A299701, A304792, A364916, A365311, A365376, A365541.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A357976
|
|
Numbers with a divisor having the same sum of prime indices as their quotient.
|
|
+10
38
|
|
|
1, 4, 9, 12, 16, 25, 30, 36, 40, 48, 49, 63, 64, 70, 81, 84, 90, 100, 108, 112, 120, 121, 144, 154, 160, 165, 169, 192, 196, 198, 210, 220, 225, 252, 256, 264, 270, 273, 280, 286, 289, 300, 324, 325, 336, 351, 352, 360, 361, 364, 390, 400, 432, 441, 442, 448
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
|
|
LINKS
|
|
|
EXAMPLE
|
The terms together with their prime indices begin:
1: {}
4: {1,1}
9: {2,2}
12: {1,1,2}
16: {1,1,1,1}
25: {3,3}
30: {1,2,3}
36: {1,1,2,2}
40: {1,1,1,3}
48: {1,1,1,1,2}
49: {4,4}
For example, 40 has factorization 8*5, and both factors have the same sum of prime indices 3, so 40 is in the sequence.
|
|
MAPLE
|
filter:= proc(n) local F, s, t, i, R;
F:= ifactors(n)[2];
F:= map(t -> [numtheory:-pi(t[1]), t[2]], F);
s:= add(t[1]*t[2], t=F)/2;
if not s::integer then return false fi;
try
R:= Optimization:-Maximize(0, [add(F[i][1]*x[i], i=1..nops(F)) = s, seq(x[i]<= F[i][2], i=1..nops(F))], assume=nonnegint, depthlimit=20);
catch "no feasible integer point found; use feasibilitytolerance option to adjust tolerance": return false;
end try;
true
end proc:
filter(1):= true:
|
|
MATHEMATICA
|
sumprix[n_]:=Total[Cases[FactorInteger[n], {p_, k_}:>k*PrimePi[p]]];
Select[Range[100], MemberQ[sumprix/@Divisors[#], sumprix[#]/2]&]
|
|
CROSSREFS
|
The partitions with these Heinz numbers are counted by A002219.
Positions of nonzero terms in A357879.
Cf. A033879, A033880, A064914, A181819, A213086, A235130, A237194, A276107, A300273, A321144, A357975.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A064914
|
|
Number of ordered biquanimous partitions of 2n.
|
|
+10
33
|
|
|
1, 1, 5, 23, 105, 449, 1902, 7828, 31976, 129200, 520425, 2088217, 8371186, 33514797, 134140430, 536699674, 2147154667, 8589198795, 34358341823, 137435830265, 549749857574, 2199010044813, 8796067657649, 35184315676573, 140737380485376, 562949713881526
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
A biquanimous partition is one that can be bisected into two equal sized parts: e.g. 3+2+1 is a biquanimous partition of 6 as it contains 3 and 2+1, but 5+1 is not.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(0) = 1 through a(3) = 23 biquanimous compositions:
() (11) (22) (33)
(112) (123)
(121) (132)
(211) (213)
(1111) (231)
(312)
(321)
(1113)
(1122)
(1131)
(1212)
(1221)
(1311)
(2112)
(2121)
(2211)
(3111)
(11112)
(11121)
(11211)
(12111)
(21111)
(111111)
(End)
|
|
MATHEMATICA
|
Table[Length[Select[Join@@Permutations/@IntegerPartitions[2n], MemberQ[Total/@Subsets[#], n]&]], {n, 0, 5}] (* Gus Wiseman, Apr 19 2024 *)
|
|
CROSSREFS
|
The complement is counted by A371956.
A237258 (aerated) counts biquanimous strict partitions, ranks A357854.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A371783
|
|
Irregular triangle read by rows where T(n,d) is the number of integer partitions of n that can be partitioned into d blocks with equal sums, with d ranging over all divisors d|n.
|
|
+10
31
|
|
|
1, 2, 1, 3, 1, 5, 3, 1, 7, 1, 11, 6, 4, 1, 15, 1, 22, 14, 5, 1, 30, 10, 1, 42, 25, 6, 1, 56, 1, 77, 53, 30, 15, 7, 1, 101, 1, 135, 89, 8, 1, 176, 65, 21, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1
2 1
3 1
5 3 1
7 1
11 6 4 1
15 1
22 14 5 1
30 10 1
42 25 6 1
56 1
77 53 30 15 7 1
101 1
135 89 8 1
176 65 21 1
Row n = 6 counts the following partitions:
(6) (33) (222) (111111)
(33) (321) (2211)
(42) (2211) (21111)
(51) (3111) (111111)
(222) (21111)
(321) (111111)
(411)
(2211)
(3111)
(21111)
(111111)
|
|
MATHEMATICA
|
hwt[n_]:=Total[Cases[FactorInteger[n], {p_, k_}:>PrimePi[p]*k]];
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
Table[Length[Select[IntegerPartitions[n], Select[facs[Times@@Prime/@#], Length[#]==k&&SameQ@@hwt/@#&]!={}&]], {n, 1, 8}, {k, Divisors[n]}]
|
|
CROSSREFS
|
A371781 lists numbers with biquanimous prime signature, complement A371782.
|
|
KEYWORD
|
nonn,tabf,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A321142
|
|
Number of strict integer partitions of 2*n with no subset summing to n.
|
|
+10
30
|
|
|
0, 1, 2, 3, 5, 7, 11, 15, 23, 30, 43, 57, 79, 102, 138, 174, 232, 292, 375, 471, 602, 741, 935, 1148, 1425, 1733, 2137, 2571, 3156, 3789, 4557, 5470, 6582, 7796, 9317, 11027, 13058, 15400, 18159, 21249, 24971, 29170, 33986, 39596, 46073, 53219, 61711, 71330, 82171
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 1 through a(8) = 23 partitions:
(2) (4) (6) (8) (10) (12) (14) (16)
(3,1) (4,2) (5,3) (6,4) (7,5) (8,6) (9,7)
(5,1) (6,2) (7,3) (8,4) (9,5) (10,6)
(7,1) (8,2) (9,3) (10,4) (11,5)
(5,2,1) (9,1) (10,2) (11,3) (12,4)
(6,3,1) (11,1) (12,2) (13,3)
(7,2,1) (5,4,3) (13,1) (14,2)
(7,3,2) (6,5,3) (15,1)
(7,4,1) (8,4,2) (7,5,4)
(8,3,1) (8,5,1) (7,6,3)
(9,2,1) (9,3,2) (9,4,3)
(9,4,1) (9,5,2)
(10,3,1) (9,6,1)
(11,2,1) (10,4,2)
(8,3,2,1) (10,5,1)
(11,3,2)
(11,4,1)
(12,3,1)
(13,2,1)
(6,5,4,1)
(7,4,3,2)
(9,4,2,1)
(10,3,2,1)
|
|
MATHEMATICA
|
Table[Length[Select[IntegerPartitions[n], And[UnsameQ@@#, !Or@@Table[SameQ[Total[#[[s]]], n/2], {s, Subsets[Range[Length[#]]]}]]&]], {n, 2, 20, 2}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A371795
|
|
Number of non-biquanimous integer partitions of n.
|
|
+10
27
|
|
|
0, 1, 1, 3, 2, 7, 5, 15, 8, 30, 17, 56, 24, 101, 46, 176, 64, 297, 107, 490, 147, 792, 242, 1255, 302, 1958, 488, 3010, 629, 4565, 922
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
A finite multiset of numbers is defined to be biquanimous iff it can be partitioned into two multisets with equal sums. Biquanimous partitions are counted by A002219 and ranked by A357976.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 1 through a(8) = 8 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(21) (31) (32) (42) (43) (53)
(111) (41) (51) (52) (62)
(221) (222) (61) (71)
(311) (411) (322) (332)
(2111) (331) (521)
(11111) (421) (611)
(511) (5111)
(2221)
(3211)
(4111)
(22111)
(31111)
(211111)
(1111111)
|
|
MATHEMATICA
|
biqQ[y_]:=MemberQ[Total/@Subsets[y], Total[y]/2];
Table[Length[Select[IntegerPartitions[n], Not@*biqQ]], {n, 0, 15}]
|
|
CROSSREFS
|
These partitions have ranks A371731.
A371781 lists numbers with biquanimous prime signature, complement A371782.
A371783 counts k-quanimous partitions.
Cf. A035470, A064914, A305551, A336137, A365543, A365661, A365663, A366320, A365925, A367094, A371788.
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A357854
|
|
Squarefree numbers with a divisor having the same sum of prime indices as their quotient.
|
|
+10
25
|
|
|
1, 30, 70, 154, 165, 210, 273, 286, 390, 442, 462, 561, 595, 646, 714, 741, 858, 874, 910, 1045, 1155, 1173, 1254, 1326, 1330, 1334, 1495, 1653, 1771, 1794, 1798, 1870, 1938, 2139, 2145, 2294, 2415, 2465, 2470, 2530, 2622, 2639, 2730, 2926, 2945, 2958, 3034
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
|
|
LINKS
|
|
|
EXAMPLE
|
The terms together with their prime indices begin:
1: {}
30: {1,2,3}
70: {1,3,4}
154: {1,4,5}
165: {2,3,5}
210: {1,2,3,4}
273: {2,4,6}
286: {1,5,6}
390: {1,2,3,6}
For example, 210 has factorization 14*15, and both factors have the same sum of prime indices 5, so 210 is in the sequence.
|
|
MATHEMATICA
|
sumprix[n_]:=Total[Cases[FactorInteger[n], {p_, k_}:>k*PrimePi[p]]];
Select[Range[1000], SquareFreeQ[#]&&MemberQ[sumprix/@Divisors[#], sumprix[#]/2]&]
|
|
CROSSREFS
|
The partitions with these Heinz numbers are counted by A237258.
Squarefree positions of nonzero terms in A357879.
Cf. A033879, A033880, A064914, A181819, A235130, A237194, A276107, A300273, A321144, A357975, A357976.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.023 seconds
|