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.

Showing 1-10 of 11 results. Next

A357639 Number of reversed integer partitions of 2n whose half-alternating sum is 0.

Original entry on oeis.org

1, 0, 2, 1, 6, 4, 15, 13, 37, 37, 86, 94, 194, 223, 416, 497, 867, 1056, 1746, 2159, 3424, 4272, 6546, 8215, 12248, 15418, 22449, 28311, 40415, 50985, 71543, 90222, 124730, 157132, 214392, 269696, 363733, 456739, 609611, 763969, 1010203, 1263248, 1656335, 2066552, 2688866
Offset: 0

Views

Author

Gus Wiseman, Oct 11 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			The a(0) = 1 through a(6) = 15 reversed partitions:
  ()  .  (112)   (123)  (134)       (145)      (156)
         (1111)         (224)       (235)      (246)
                        (2222)      (11233)    (336)
                        (11222)     (1111123)  (3333)
                        (1111112)              (11244)
                        (11111111)             (11334)
                                               (12333)
                                               (1111134)
                                               (1111224)
                                               (1112223)
                                               (1122222)
                                               (11112222)
                                               (111111222)
                                               (11111111112)
                                               (111111111111)
		

Crossrefs

The non-reverse version is A035363/A035444.
The non-reverse skew version appears to be A035544/A035594.
These partitions are ranked by A357631, skew A357632.
The skew-alternating version is A357640.
This is the central column of A357704.
A000041 counts integer partitions (also reversed integer partitions).
A316524 gives alternating sum of prime indices, reverse A344616.
A344651 counts alternating sum of partitions by length, ordered A097805.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.
A357637 counts partitions by half-alternating sum, skew A357637.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[2n],halfats[Reverse[#]]==0&]],{n,0,15}]

Extensions

a(31) onwards from Lucas A. Brown, Oct 19 2022

A357637 Triangle read by rows where T(n,k) is the number of integer partitions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 1, 1, 3, 0, 0, 0, 2, 2, 3, 0, 0, 0, 0, 5, 2, 4, 0, 0, 0, 0, 2, 6, 3, 4, 0, 0, 0, 0, 2, 3, 9, 3, 5, 0, 0, 0, 0, 0, 4, 7, 10, 4, 5, 0, 0, 0, 0, 0, 0, 11, 8, 13, 4, 6, 0, 0, 0, 0, 0, 0, 4, 15, 12, 14, 5, 6, 0, 0, 0, 0, 0, 0, 3, 7, 25, 13, 17, 5, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  1  1  3
  0  0  0  2  2  3
  0  0  0  0  5  2  4
  0  0  0  0  2  6  3  4
  0  0  0  0  2  3  9  3  5
  0  0  0  0  0  4  7 10  4  5
  0  0  0  0  0  0 11  8 13  4  6
  0  0  0  0  0  0  4 15 12 14  5  6
  0  0  0  0  0  0  3  7 25 13 17  5  7
Row n = 9 counts the following partitions:
  (3222)       (333)      (432)     (441)  (9)
  (22221)      (3321)     (522)     (531)  (54)
  (21111111)   (4221)     (4311)    (621)  (63)
  (111111111)  (32211)    (5211)    (711)  (72)
               (222111)   (6111)           (81)
               (2211111)  (33111)
               (3111111)  (42111)
                          (51111)
                          (321111)
                          (411111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004525(n+1).
Last entry of row n is A008619(n).
Column sums appear to be A029862.
The central column is A035363, skew A035544.
For original alternating sum we have A344651, ordered A097805.
The skew-alternating version is A357638.
The central column of the reverse is A357639, skew A357640.
The ordered version (compositions) is A357645, skew A357646.
The reverse version is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Maple
    b:= proc(n, i, s, t) option remember; `if`(n=0, x^s, `if`(i<1, 0,
          b(n, i-1, s, t)+b(n-i, min(n-i, i), s+`if`(t<2, i, -i), irem(t+1, 4))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=-n..n, 2))(b(n$2, 0$2)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Oct 12 2022
  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],halfats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The column sums are A029862.

A357189 Number of integer partitions of n with the same length as alternating sum.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 2, 2, 4, 3, 5, 6, 9, 9, 13, 16, 23, 23, 34, 37, 54, 54, 78, 84, 120, 121, 170, 182, 252, 260, 358, 379, 517, 535, 725, 764, 1030, 1064, 1427, 1494, 1992, 2059, 2733, 2848, 3759, 3887, 5106, 5311, 6946, 7177, 9345, 9701, 12577, 12996, 16788
Offset: 0

Views

Author

Gus Wiseman, Sep 30 2022

Keywords

Comments

A partition of n is a weakly decreasing sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(4) = 1 through a(13) = 9 partitions:
  31   311   42   322   53     333     64     443     75       553
                  421   5111   432     5221   542     5331     652
                               531     6211   641     6222     751
                               51111          52211   6321     52222
                                              62111   7311     53311
                                                      711111   62221
                                                               63211
                                                               73111
                                                               7111111
		

Crossrefs

For product equal to sum we have A001055, compositions A335405.
For product instead of length we have A004526, compositions A114220.
The version for compositions is A357182, ranked by A357184.
For sum equal to twice alternating sum we have A357189 (this sequence).
These partitions are ranked by A357486.
The reverse version is A357487, ranked by A357485.
A000041 counts partitions, strict A000009.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.

Programs

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

A357638 Triangle read by rows where T(n,k) is the number of integer partitions of n with skew-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 3, 1, 1, 0, 0, 1, 4, 1, 1, 0, 0, 1, 4, 4, 1, 1, 0, 0, 0, 4, 5, 4, 1, 1, 0, 0, 0, 1, 10, 5, 4, 1, 1, 0, 0, 0, 1, 5, 13, 5, 4, 1, 1, 0, 0, 0, 0, 4, 13, 14, 5, 4, 1, 1, 0, 0, 0, 0, 1, 13, 17, 14, 5, 4, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ....

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  0  3  1  1
  0  0  1  4  1  1
  0  0  1  4  4  1  1
  0  0  0  4  5  4  1  1
  0  0  0  1 10  5  4  1  1
  0  0  0  1  5 13  5  4  1  1
  0  0  0  0  4 13 14  5  4  1  1
  0  0  0  0  1 13 17 14  5  4  1  1
  0  0  0  0  1  5 28 18 14  5  4  1  1
Row n = 7 counts the following partitions:
  .  .  .  (322)      (43)      (52)     (61)  (7)
           (331)      (421)     (511)
           (2221)     (3211)    (4111)
           (1111111)  (22111)   (31111)
                      (211111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004396(n+1).
First nonzero entry of each row appears to converge to A146325.
The central column is A035544, half A035363.
Column sums appear to be A298311.
For original alternating sum we have A344651, ordered A097805.
The half-alternating version is A357637.
The ordered version (compositions) is A357646, half A357645.
The reverse version is A357705, half A357704.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],skats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The columns are palindromes with sums A298311.

A357640 Number of reversed integer partitions of 2n whose skew-alternating sum is 0.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 24, 40, 59, 93, 136, 208, 299, 445, 632, 921, 1292, 1848, 2563, 3610, 4954, 6881, 9353, 12835, 17290, 23469, 31357, 42150, 55889, 74463, 98038, 129573, 169476, 222339, 289029, 376618, 486773, 630313, 810285, 1043123, 1334174
Offset: 0

Views

Author

Gus Wiseman, Oct 11 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ...

Examples

			The a(0) = 1 through a(5) = 9 partitions:
  ()  (11)  (22)    (33)      (44)        (55)
            (1111)  (2211)    (2222)      (3322)
                    (111111)  (3221)      (4321)
                              (3311)      (4411)
                              (221111)    (222211)
                              (11111111)  (322111)
                                          (331111)
                                          (22111111)
                                          (1111111111)
		

Crossrefs

The non-reverse half-alternating version is A035363/A035444.
The non-reverse version appears to be A035544/A035594.
These partitions are ranked by A357632, half A357631.
The half-alternating version is A357639.
A000041 counts integer partitions (also reversed integer partitions).
A316524 gives alternating sum of prime indices, reverse A344616.
A344651 counts alternating sum of partitions by length, ordered A097805.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.
A357637 counts partitions by half-alternating sum, skew A357638.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[2n],skats[Reverse[#]]==0&]],{n,0,15}]

Extensions

a(31) onwards from Lucas A. Brown, Oct 19 2022

A357488 Number of integer partitions of 2n - 1 with the same length as alternating sum.

Original entry on oeis.org

1, 0, 1, 2, 4, 5, 9, 13, 23, 34, 54, 78, 120, 170, 252, 358, 517, 725, 1030, 1427, 1992, 2733, 3759, 5106, 6946, 9345, 12577, 16788, 22384, 29641, 39199, 51529, 67626, 88307, 115083, 149332, 193383, 249456, 321134, 411998, 527472, 673233, 857539, 1089223, 1380772
Offset: 1

Views

Author

Gus Wiseman, Oct 02 2022

Keywords

Comments

A partition of n is a weakly decreasing sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(1) = 1 through a(7) = 9 partitions:
  (1)  .  (311)  (322)  (333)    (443)    (553)
                 (421)  (432)    (542)    (652)
                        (531)    (641)    (751)
                        (51111)  (52211)  (52222)
                                 (62111)  (53311)
                                          (62221)
                                          (63211)
                                          (73111)
                                          (7111111)
		

Crossrefs

For product equal to sum we have A001055, compositions A335405.
The version for compositions appears to be A222763, odd version of A357182.
These are the odd-indexed terms of A357189, ranked by A357486.
These partitions are ranked by the odd-sum portion of A357485.
Except at the start, alternately adding zeros gives A357487.
A000041 counts partitions, strict A000009.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.

Programs

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

Formula

a(n) = A357189(2n - 1).

Extensions

More terms from Alois P. Heinz, Oct 04 2022

A035544 Number of partitions of n with equal number of parts congruent to each of 1 and 3 (mod 4).

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 4, 0, 10, 0, 13, 0, 28, 0, 37, 0, 72, 0, 96, 0, 172, 0, 230, 0, 391, 0, 522, 0, 846, 0, 1129, 0, 1766, 0, 2348, 0, 3564, 0, 4722, 0, 6992, 0, 9226, 0, 13371, 0, 17568, 0, 25006, 0, 32708, 0, 45817, 0, 59668, 0, 82430, 0, 106874, 0, 145830, 0, 188260, 0
Offset: 0

Views

Author

Keywords

Comments

From Gus Wiseman, Oct 12 2022: (Start)
Also the number of integer partitions of n whose skew-alternating sum is 0, where we define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ... These are the conjugates of the partitions described in the name. For example, the a(0) = 1 through a(8) = 10 partitions are:
() . (11) . (22) . (33) . (44)
(211) (321) (422)
(1111) (2211) (431)
(111111) (2222)
(3221)
(3311)
(22211)
(221111)
(2111111)
(11111111)
The ordered version (compositions) is A138364
These partitions are ranked by A357636, reverse A357632.
The reverse version is A357640 (aerated).
(End)

Examples

			From _Gus Wiseman_, Oct 12 2022: (Start)
The a(0) = 1 through a(8) = 10 partitions:
  ()  .  (2)  .  (4)   .  (6)    .  (8)
                 (22)     (42)      (44)
                 (31)     (222)     (53)
                          (321)     (62)
                                    (71)
                                    (422)
                                    (431)
                                    (2222)
                                    (3221)
                                    (3311)
(End)
		

Crossrefs

The case with at least one odd part is A035550.
Removing zeros gives A035594.
Central column k=0 of A357638.
These partitions are ranked by A357707.
A000041 counts integer partitions.
A344651 counts partitions by alternating sum, ordered A097805.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],skats[#]==0&]],{n,0,30}] (* Gus Wiseman,Oct 12 2022 *)

Extensions

More terms from David W. Wilson

A357485 Heinz numbers of integer partitions with the same length as reverse-alternating sum.

Original entry on oeis.org

1, 2, 20, 42, 45, 105, 110, 125, 176, 182, 231, 245, 312, 374, 396, 429, 494, 605, 663, 680, 702, 780, 782, 845, 891, 969, 1064, 1088, 1100, 1102, 1311, 1426, 1428, 1445, 1530, 1755, 1805, 1820, 1824, 1950, 2001, 2024, 2146, 2156, 2394, 2448, 2475, 2508, 2542
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^i y_i.

Examples

			The terms together with their prime indices begin:
     1: {}
     2: {1}
    20: {1,1,3}
    42: {1,2,4}
    45: {2,2,3}
   105: {2,3,4}
   110: {1,3,5}
   125: {3,3,3}
   176: {1,1,1,1,5}
   182: {1,4,6}
   231: {2,4,5}
   245: {3,4,4}
   312: {1,1,1,2,6}
   374: {1,5,7}
   396: {1,1,2,2,5}
		

Crossrefs

The version for compositions is A357184, counted by A357182.
These partitions are counted by A357189.
For absolute value we have A357486, counted by A357487.
A000041 counts partitions, strict A000009.
A000712 up to 0's counts partitions w sum = twice alt sum, ranked A349159.
A001055 counts partitions with product equal to sum, ranked by A301987.
A006330 up to 0's counts partitions w sum = twice rev-alt sum, rank A349160.

Programs

  • Mathematica
    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]}];
    Select[Range[100],PrimeOmega[#]==ats[primeMS[#]]&]

A357486 Heinz numbers of integer partitions with the same length as alternating sum.

Original entry on oeis.org

1, 2, 10, 20, 21, 42, 45, 55, 88, 91, 105, 110, 125, 156, 176, 182, 187, 198, 231, 245, 247, 312, 340, 351, 374, 390, 391, 396, 429, 494, 532, 544, 550, 551, 605, 663, 680, 702, 713, 714, 765, 780, 782, 845, 891, 910, 912, 969, 975, 1012, 1064, 1073, 1078
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The terms together with their prime indices begin:
     1: {}
     2: {1}
    10: {1,3}
    20: {1,1,3}
    21: {2,4}
    42: {1,2,4}
    45: {2,2,3}
    55: {3,5}
    88: {1,1,1,5}
    91: {4,6}
   105: {2,3,4}
   110: {1,3,5}
   125: {3,3,3}
   156: {1,1,2,6}
   176: {1,1,1,1,5}
		

Crossrefs

For product instead of length we have new, counted by A004526.
The version for compositions is A357184, counted by A357182.
For absolute value we have A357486, counted by A357487.
These partitions are counted by A357189.
A000041 counts partitions, strict A000009.
A000712 up to 0's counts partitions, sum = twice alt sum, rank A349159.
A001055 counts partitions with product equal to sum, ranked by A301987.
A006330 up to 0's counts partitions, sum = twice rev-alt sum, rank A349160.
A025047 counts alternating compositions.
A357136 counts compositions by alternating sum.

Programs

  • Mathematica
    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]}];
    Select[Range[100],PrimeOmega[#]==ats[Reverse[primeMS[#]]]&]

A357704 Triangle read by rows where T(n,k) is the number of reversed integer partitions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 3, 0, 0, 2, 2, 0, 3, 0, 0, 3, 1, 3, 0, 4, 0, 0, 3, 2, 4, 2, 0, 4, 0, 0, 4, 2, 6, 2, 3, 0, 5, 0, 0, 4, 3, 5, 7, 3, 3, 0, 5, 0, 0, 5, 3, 8, 4, 10, 2, 4, 0, 6, 0, 0, 5, 4, 8, 6, 11, 9, 3, 4, 0, 6, 0, 0, 6, 4, 11, 5, 15, 8, 13, 3, 5, 0, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  2  0  3
  0  0  2  2  0  3
  0  0  3  1  3  0  4
  0  0  3  2  4  2  0  4
  0  0  4  2  6  2  3  0  5
  0  0  4  3  5  7  3  3  0  5
  0  0  5  3  8  4 10  2  4  0  6
  0  0  5  4  8  6 11  9  3  4  0  6
  0  0  6  4 11  5 15  8 13  3  5  0  7
  0  0  6  5 11  8 13 19 10 13  4  5  0  7
  0  0  7  5 14  8 19 13 25  9 17  4  6  0  8
  0  0  7  6 14 11 19 17 29 23 13 18  5  6  0  8
Row n = 7 counts the following reversed partitions:
  .  .  (115)   (124)   (133)      (11113)   .  (7)
        (1114)  (1222)  (223)      (111112)     (16)
        (1123)          (11122)                 (25)
                        (1111111)               (34)
		

Crossrefs

Row sums are A000041.
Last entry of row n is A008619(n).
The central column in the non-reverse case is A035363, skew A035544.
For original reverse-alternating sum we have A344612.
For original alternating sum we have A344651, ordered A097805.
The non-reverse version is A357637, skew A357638.
The central column is A357639, skew A357640.
The non-reverse ordered version (compositions) is A357645, skew A357646.
The skew-alternating version is A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[Reverse/@IntegerPartitions[n],halfats[#]==k&]],{n,0,15},{k,-n,n,2}]
Showing 1-10 of 11 results. Next