cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348552 Number of integer partitions of n with the same alternating product as alternating sum.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 5, 7, 8, 12, 14, 19, 23, 31, 36, 46, 55, 69, 83, 100, 122, 144, 175, 203, 249, 284, 348, 393, 484, 536, 661, 725, 898, 975, 1208, 1297, 1614, 1715, 2136, 2251, 2812, 2939, 3674, 3813, 4779, 4920, 6172, 6315, 7943, 8070, 10156, 10263, 12944
Offset: 0

Views

Author

Gus Wiseman, Oct 30 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. In the case of a partition, this equals the number of odd parts in the conjugate partition.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

			The a(1) = 1 through a(9) = 12 partitions:
  1   2   3     4     5       6       7         8         9
          111   211   221     42      322       332       333
                      311     222     331       422       441
                      11111   411     511       611       522
                              21111   22111     4211      711
                                      31111     22211     22221
                                      1111111   41111     32211
                                                2111111   33111
                                                          51111
                                                          2211111
                                                          3111111
                                                          111111111
For example, we have 3 - 2 + 2 - 1 + 1 = 3 / 2 * 2 / 1 * 1 = 3, so the partition (3,2,2,1,1) is counted under a(9).
		

Crossrefs

The version for reverse-alternating sum (or product, or both) is A025065.
Dominated by A347446.
A000041 counts partitions with alternating sum 0.
A027187 counts partitions of even length.
A027193 counts partitions of odd length, ranked by A026424.
A097805 counts compositions by sum and alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A124754 gives alternating sums of standard compositions.
A277103 counts partitions with the same alternating sum as their conjugate.
A345927 gives alternating sums of binary expansions.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[IntegerPartitions[n],altprod[#]==ats[#]&]],{n,0,30}]