1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 4, 1, 0, 1, 5, 10, 10, 5, 1, 0, 1, 6, 15, 20, 15, 6, 1, 0, 1, 7, 21, 35, 35, 21, 7, 1, 0, 1, 8, 28, 56, 70, 56, 28, 8, 1, 0, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 0, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
Offset: 0
A344616
Alternating sum of the integer partition with Heinz number n.
Original entry on oeis.org
0, 1, 2, 0, 3, 1, 4, 1, 0, 2, 5, 2, 6, 3, 1, 0, 7, 1, 8, 3, 2, 4, 9, 1, 0, 5, 2, 4, 10, 2, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 3, 14, 5, 3, 8, 15, 2, 0, 1, 5, 6, 16, 1, 2, 3, 6, 9, 17, 1, 18, 10, 4, 0, 3, 4, 19, 7, 7, 2, 20, 1, 21, 11, 2, 8, 1, 5, 22, 3, 0, 12
Offset: 1
The partition (6,4,3,2,2) has Heinz number 4095 and conjugate (5,5,3,2,1,1), so a(4095) = 5.
A version for compositions is
A124754.
The version for prime multiplicities is
A316523.
A000041 counts partitions of 2n with alternating sum 0.
A103919 counts partitions by sum and alternating sum.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.
Cf.
A000070,
A001222,
A026424,
A028260,
A116406,
A119899,
A343938,
A344607,
A344608,
A344609,
A344619,
A344653,
A344739.
-
a:= n-> (l-> -add(l[i]*(-1)^i, i=1..nops(l)))(sort(map(
i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)):
seq(a(n), n=1..82); # Alois P. Heinz, Jun 04 2021
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
Table[ats[Reverse[primeMS[n]]],{n,100}]
A344612
Triangle read by rows where T(n,k) is the number of integer partitions of n with reverse-alternating sum k ranging from -n to n in steps of 2.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 2, 3, 3, 1, 1, 0, 1, 2, 4, 3, 3, 1, 1, 0, 1, 2, 4, 5, 5, 3, 1, 1, 0, 1, 2, 4, 7, 5, 6, 3, 1, 1, 0, 1, 2, 4, 8, 7, 9, 6, 3, 1, 1, 0, 1, 2, 4, 8, 12, 7, 11, 6, 3, 1, 1, 0, 1, 2, 4, 8, 14, 11, 14, 12, 6, 3, 1, 1
Offset: 0
Triangle begins:
1
0 1
0 1 1
0 1 1 1
0 1 2 1 1
0 1 2 2 1 1
0 1 2 3 3 1 1
0 1 2 4 3 3 1 1
0 1 2 4 5 5 3 1 1
0 1 2 4 7 5 6 3 1 1
0 1 2 4 8 7 9 6 3 1 1
0 1 2 4 8 12 7 11 6 3 1 1
0 1 2 4 8 14 11 14 12 6 3 1 1
0 1 2 4 8 15 19 11 18 12 6 3 1 1
0 1 2 4 8 15 24 15 23 20 12 6 3 1 1
0 1 2 4 8 15 26 30 15 31 21 12 6 3 1 1
For example, row n = 7 counts the following partitions:
(61) (52) (43) (331) (322) (511) (7)
(4111) (2221) (22111) (421)
(3211) (1111111) (31111)
(211111)
Row n = 9 counts the following partitions:
81 72 63 54 441 333 522 711 9
6111 4221 3222 22221 432 621
5211 3321 33111 531 51111
411111 4311 2211111 32211
222111 111111111 42111
321111 3111111
21111111
The midline k = n/2 is also
A000041.
The right half (i.e., k >= 0) for even n is
A344610.
The rows appear to converge to
A344611 (from left) and
A006330 (from right).
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A120452 counts partitions of 2n with rev-alt sum 2 (negative:
A344741).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A344618 gives reverse-alternating sums of standard compositions.
Cf.
A000070,
A000097,
A003242,
A027187,
A124754,
A152146,
A344607,
A344608,
A344649,
A344650,
A344654.
-
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
Table[Length[Select[IntegerPartitions[n],sats[#]==k&]],{n,0,15},{k,-n,n,2}]
-
row(n)={my(v=vector(n+1)); forpart(p=n, my(s=-sum(i=1, #p, p[i]*(-1)^i)); v[(s+n)/2+1]++); v} \\ Andrew Howroyd, Jan 06 2024
A000097
Number of partitions of n if there are two kinds of 1's and two kinds of 2's.
Original entry on oeis.org
1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0
a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
(1,1) (3,1) (3,3) (5,3)
(2,1,1) (5,1) (7,1)
(3,2,1) (3,3,2)
(4,1,1) (4,3,1)
(2,2,1,1) (5,2,1)
(6,1,1)
(3,2,2,1)
(4,2,1,1)
(2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
(2) (3,1) (4,2) (5,3)
(2,1,1) (2,2,2) (3,3,2)
(3,2,1) (4,3,1)
(3,1,1,1) (3,2,2,1)
(2,1,1,1,1) (4,2,1,1)
(2,2,2,1,1)
(3,2,1,1,1)
(3,1,1,1,1,1)
(2,1,1,1,1,1,1)
(End)
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
- 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).
- T. D. Noe and Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
- Christian Gutschwager, The skew diagram poset and components of skew characters, arXiv:1104.0008 [math.CO], 2011.
- Christian Gutschwager, Reduced Kronecker products which are multiplicity free or contain only a few components, Eur. J. Combinat. 31 (2010) 1996-2005. doi:10.1016/j.ejc.2010.05.008.
- J. P. Robinson, Edges in the poset of partitions of an integer, J. Combin. Theory Ser. A, 48 (1988), 236-238.
- N. J. A. Sloane, Transforms
The case of reverse-alternating sum 1 or alternating sum 0 is
A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is
A000070.
The case of reverse-alternating sum 2 is
A120452.
The case of reverse-alternating sum -2 is
A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A124754 gives alternating sums of standard compositions (reverse:
A344618).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Cf.
A006330,
A027187,
A239830,
A306145,
A343941,
A344607,
A344608,
A344619,
A344650,
A344651,
A344740.
-
with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
-
CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
(1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
T[, ] = 0;
a[n_] := T[n + 3, 2];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
-
my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
A344607
Number of integer partitions of n with reverse-alternating sum >= 0.
Original entry on oeis.org
1, 1, 2, 2, 4, 4, 8, 8, 15, 16, 27, 29, 48, 52, 81, 90, 135, 151, 220, 248, 352, 400, 553, 632, 859, 985, 1313, 1512, 1986, 2291, 2969, 3431, 4394, 5084, 6439, 7456, 9357, 10836, 13479, 15613, 19273, 22316, 27353, 31659, 38558, 44601, 53998, 62416, 75168
Offset: 0
The a(1) = 1 through a(8) = 15 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (221) (33) (322) (44)
(211) (311) (222) (331) (332)
(1111) (11111) (321) (421) (422)
(411) (511) (431)
(2211) (22111) (521)
(21111) (31111) (611)
(111111) (1111111) (2222)
(3311)
(22211)
(32111)
(41111)
(221111)
(2111111)
(11111111)
The non-reversed version is
A000041.
The opposite version (rev-alt sum <= 0) is
A027187, ranked by
A028260.
The complement is counted by
A344608.
The Heinz numbers of these partitions are
A344609 (complement:
A119899).
A103919 counts partitions by sum and alternating sum.
A316524 is the alternating sum of prime indices of n (reversed:
A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.
Cf.
A006330,
A071321,
A071322,
A124754,
A239829,
A239830,
A344604,
A344651,
A344654,
A344739,
A344742.
-
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
Table[Length[Select[IntegerPartitions[n],sats[#]>=0&]],{n,0,30}]
A116406
Expansion of ((1 + x - 2x^2) + (1+x)*sqrt(1-4x^2))/(2(1-4x^2)).
Original entry on oeis.org
1, 1, 2, 3, 7, 11, 26, 42, 99, 163, 382, 638, 1486, 2510, 5812, 9908, 22819, 39203, 89846, 155382, 354522, 616666, 1401292, 2449868, 5546382, 9740686, 21977516, 38754732, 87167164, 154276028, 345994216, 614429672, 1374282019, 2448023843
Offset: 0
The alternating sum > 0 case appears to be
A027306.
The alternating sum <= 0 version is
A058622.
The alternating sum < 0 version is
A294175.
The restriction to reversed partitions is
A344607.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A124754 gives the alternating sum of standard compositions.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344616 lists the alternating sums of partitions by Heinz number.
Cf.
A000041,
A000070,
A000097,
A003242,
A006330,
A028260,
A058696,
A119899,
A239830,
A344605,
A344611,
A344650,
A344739.
-
CoefficientList[Series[((1+x-2x^2)+(1+x)Sqrt[1-4x^2])/(2(1-4x^2)),{x,0,40}],x] (* Harvey P. Dale, Aug 16 2012 *)
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],ats[#]>=0&]],{n,0,15}] (* Gus Wiseman, Jun 20 2021 *)
A344651
Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with alternating sum k, with k ranging from n mod 2 to n in steps of 2.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 2, 2, 1, 4, 2, 1, 3, 5, 2, 1, 7, 5, 2, 1, 5, 9, 5, 2, 1, 12, 10, 5, 2, 1, 7, 17, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 11, 28, 20, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 15, 47, 35, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 22, 73, 62, 36, 20, 10, 5, 2, 1
Offset: 0
Triangle begins:
1
1
1 1
2 1
2 2 1
4 2 1
3 5 2 1
7 5 2 1
5 9 5 2 1
12 10 5 2 1
7 17 10 5 2 1
19 19 10 5 2 1
11 28 20 10 5 2 1
30 33 20 10 5 2 1
15 47 35 20 10 5 2 1
45 57 36 20 10 5 2 1
22 73 62 36 20 10 5 2 1
67 92 64 36 20 10 5 2 1
30 114 102 65 36 20 10 5 2 1
97 147 107 65 36 20 10 5 2 1
Row n = 10 counts the following partitions (A = 10):
(55) (64) (73) (82) (91) (A)
(3322) (442) (433) (622) (811)
(4411) (541) (532) (721)
(222211) (3331) (631) (7111)
(331111) (4222) (5221) (61111)
(22111111) (4321) (6211)
(1111111111) (5311) (42211)
(22222) (52111)
(32221) (511111)
(33211) (4111111)
(43111)
(322111)
(421111)
(2221111)
(3211111)
(31111111)
(211111111)
The conjugate version is:
(A) (55) (3331) (331111) (31111111) (1111111111)
(64) (73) (5311) (511111) (211111111)
(82) (91) (7111) (3211111)
(442) (433) (33211) (4111111)
(622) (532) (43111) (22111111)
(4222) (541) (52111)
(22222) (631) (61111)
(721) (322111)
(811) (421111)
(3322) (2221111)
(4321)
(4411)
(5221)
(6211)
(32221)
(42211)
(222211)
This is
A103919 with all zeros removed.
The reverse version is the right half of
A344612.
The strict reverse version is the right half of
A344739.
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A027187 counts partitions with rev-alternating sum <= 0, ranked by
A028260.
A124754 lists alternating sums of standard compositions (reverse:
A344618).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A344607 counts partitions with rev-alternating sum >= 0, ranked by
A344609.
A344608 counts partitions with rev-alternating sum < 0, ranked by
A119899.
A344610 counts partitions of n by positive rev-alternating sum.
A344611 counts partitions of 2n with rev-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
A346697 gives the sum of odd-indexed prime indices (reverse:
A346699).
Cf.
A000070,
A000097,
A003242,
A006330,
A025047,
A097805,
A114121,
A116406,
A131577,
A344617,
A344649,
A344650,
A344654,
A346633.
-
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
Table[Length[Select[IntegerPartitions[n],ats[#]==k&]],{n,0,15},{k,Mod[n,2],n,2}]
A344618
Reverse-alternating sums of standard compositions (A066099). Alternating sums of the compositions ranked by A228351.
Original entry on oeis.org
0, 1, 2, 0, 3, -1, 1, 1, 4, -2, 0, 2, 2, 0, 2, 0, 5, -3, -1, 3, 1, 1, 3, -1, 3, -1, 1, 1, 3, -1, 1, 1, 6, -4, -2, 4, 0, 2, 4, -2, 2, 0, 2, 0, 4, -2, 0, 2, 4, -2, 0, 2, 2, 0, 2, 0, 4, -2, 0, 2, 2, 0, 2, 0, 7, -5, -3, 5, -1, 3, 5, -3, 1, 1, 3, -1, 5, -3, -1, 3
Offset: 0
The sequence of nonnegative integers together with the corresponding standard compositions and their reverse-alternating sums begins:
0: () -> 0 15: (1111) -> 0 30: (1112) -> 1
1: (1) -> 1 16: (5) -> 5 31: (11111) -> 1
2: (2) -> 2 17: (41) -> -3 32: (6) -> 6
3: (11) -> 0 18: (32) -> -1 33: (51) -> -4
4: (3) -> 3 19: (311) -> 3 34: (42) -> -2
5: (21) -> -1 20: (23) -> 1 35: (411) -> 4
6: (12) -> 1 21: (221) -> 1 36: (33) -> 0
7: (111) -> 1 22: (212) -> 3 37: (321) -> 2
8: (4) -> 4 23: (2111) -> -1 38: (312) -> 4
9: (31) -> -2 24: (14) -> 3 39: (3111) -> -2
10: (22) -> 0 25: (131) -> -1 40: (24) -> 2
11: (211) -> 2 26: (122) -> 1 41: (231) -> 0
12: (13) -> 2 27: (1211) -> 1 42: (222) -> 2
13: (121) -> 0 28: (113) -> 3 43: (2211) -> 0
14: (112) -> 2 29: (1121) -> -1 44: (213) -> 4
Triangle begins (row lengths A011782):
0
1
2 0
3 -1 1 1
4 -2 0 2 2 0 2 0
5 -3 -1 3 1 1 3 -1 3 -1 1 1 3 -1 1 1
Up to sign, same as the reverse version
A124754.
The version for Heinz numbers of partitions is
A344616.
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A116406 counts compositions with alternating sum >= 0.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
All of the following pertain to compositions in standard order:
- Converting to reversed ranking gives
A059893.
- Strict compositions are ranked by
A233564.
- Constant compositions are ranked by
A272919.
- Anti-run compositions are ranked by
A333489.
Cf.
A000070,
A000097,
A003242,
A028260,
A119899,
A239830,
A344605,
A344607,
A344608,
A344650,
A344739.
-
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]]
Table[sats[stc[n]],{n,0,100}]
A344610
Triangle read by rows where T(n,k) is the number of integer partitions of 2n with reverse-alternating sum 2k.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 3, 1, 1, 7, 9, 6, 3, 1, 1, 11, 14, 12, 6, 3, 1, 1, 15, 23, 20, 12, 6, 3, 1, 1, 22, 34, 35, 21, 12, 6, 3, 1, 1, 30, 52, 56, 38, 21, 12, 6, 3, 1, 1, 42, 75, 91, 62, 38, 21, 12, 6, 3, 1, 1, 56, 109, 140, 103, 63, 38, 21, 12, 6, 3, 1, 1
Offset: 0
Triangle begins:
1
1 1
2 1 1
3 3 1 1
5 5 3 1 1
7 9 6 3 1 1
11 14 12 6 3 1 1
15 23 20 12 6 3 1 1
22 34 35 21 12 6 3 1 1
30 52 56 38 21 12 6 3 1 1
42 75 91 62 38 21 12 6 3 1 1
56 109 140 103 63 38 21 12 6 3 1 1
77 153 215 163 106 63 38 21 12 6 3 1 1
Row n = 5 counts the following partitions:
(55) (442) (433) (622) (811) (10)
(3322) (541) (532) (721)
(4411) (22222) (631) (61111)
(222211) (32221) (42211)
(331111) (33211) (52111)
(22111111) (43111) (4111111)
(1111111111) (2221111)
(3211111)
(211111111)
The columns with initial 0's removed appear to converge to
A006330.
The non-reversed version is
A239830.
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A103919 counts partitions by sum and alternating sum.
A120452 counts partitions of 2n with rev-alt sum 2 (negative:
A344741).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A344604 counts wiggly compositions with twins.
A344618 gives reverse-alternating sums of standard compositions.
Cf.
A000070,
A000097,
A001250,
A003242,
A027187,
A028260,
A124754,
A152146,
A344608,
A344651,
A344654.
-
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
Table[Length[Select[IntegerPartitions[n],k==sats[#]&]],{n,0,15,2},{k,0,n,2}]
Comments