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-9 of 9 results.

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.

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

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[#]]&]

A357487 Number of integer partitions of n with the same length as reverse-alternating sum.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 0, 2, 0, 4, 0, 5, 0, 9, 0, 13, 0, 23, 0, 34, 0, 54, 0, 78, 0, 120, 0, 170, 0, 252, 0, 358, 0, 517, 0, 725, 0, 1030, 0, 1427, 0, 1992, 0, 2733, 0, 3759, 0, 5106, 0, 6946, 0, 9345, 0, 12577, 0, 16788, 0, 22384, 0, 29641, 0
Offset: 0

Views

Author

Gus Wiseman, Oct 01 2022

Keywords

Comments

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

Examples

			The a(1) = 1 through a(13) = 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 is A357182, reverse ranked by A357184.
The reverse version is A357189, ranked by A357486.
These partitions are ranked by A357485.
Removing zeros gives A357488.
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[Reverse[#]]&]],{n,0,30}]

A357847 Number of integer compositions of n whose length is twice their alternating sum.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 3, 1, 8, 11, 15, 46, 59, 127, 259, 407, 888, 1591, 2925, 5896, 10607, 20582, 39446, 73448, 142691, 269777, 513721, 988638, 1876107, 3600313, 6893509, 13165219, 25288200, 48408011, 92824505, 178248758, 341801149, 656641084, 1261298356
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(0) = 1 through a(9) = 15 compositions:
  ()  .  .  (21)  .  (32)  (1131)  (43)  (1142)  (54)
                           (2121)        (1241)  (111141)
                           (3111)        (2132)  (112131)
                                         (2231)  (113121)
                                         (3122)  (114111)
                                         (3221)  (211131)
                                         (4112)  (212121)
                                         (4211)  (213111)
                                                 (311121)
                                                 (312111)
                                                 (411111)
		

Crossrefs

The version for partitions is A357709, ranked by A357848.
A011782 counts compositions.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.
A357189 counts partitions w/ length = alternating sum, ranked by A357486.

Programs

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

Extensions

a(21)-a(38) from Alois P. Heinz, Oct 19 2022

A357709 Number of integer partitions of n whose length is twice their alternating sum.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 4, 3, 6, 6, 9, 11, 13, 18, 21, 28, 32, 44, 49, 65, 76, 96, 114, 141, 170, 204, 250, 295, 361, 425, 516, 606, 734, 858, 1031, 1210, 1440, 1690, 2000, 2347, 2759, 3240, 3786, 4441, 5174, 6053, 7030, 8210, 9509, 11074, 12807, 14870
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. The alternating sum of a partition is also the number of odd conjugate parts.

Examples

			The a(1) = 0 through a(12) = 6 partitions:
  .  .  21  .  32  3111  43  3221  54      3331  65      4332
                             4211  411111  4222  422111  4431
                                           4321  521111  5322
                                           5311          5421
                                                         6411
                                                         51111111
		

Crossrefs

This is the "twice" version of A357189, ranked by A357486.
The version for compositions is A357847.
These partitions are ranked by A357848.
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.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.

Programs

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

A357848 Heinz numbers of integer partitions whose length is twice their alternating sum.

Original entry on oeis.org

1, 6, 15, 35, 40, 77, 84, 90, 143, 189, 210, 220, 221, 224, 250, 323, 364, 437, 462, 490, 495, 504, 525, 528, 667, 748, 819, 858, 899, 988, 1029, 1040, 1134, 1147, 1155, 1188, 1210, 1320, 1326, 1375, 1400, 1408, 1517, 1564, 1683, 1690, 1763, 1904, 1938, 2021
Offset: 1

Views

Author

Gus Wiseman, Oct 16 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: {}
     6: {1,2}
    15: {2,3}
    35: {3,4}
    40: {1,1,1,3}
    77: {4,5}
    84: {1,1,2,4}
    90: {1,2,2,3}
   143: {5,6}
   189: {2,2,2,4}
   210: {1,2,3,4}
   220: {1,1,3,5}
   221: {6,7}
   224: {1,1,1,1,1,4}
		

Crossrefs

These partitions are counted by A357709.
The version for compositions is counted by A357847.
A000041 counts partitions, strict A000009.
A003963 multiplies prime indices.
A025047 counts alternating compositions.
A056239 adds up prime indices.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.
A357189 counts partitions w/ length = alternating sum, ranked by A357486.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[1000],Length[primeMS[#]]==2sats[primeMS[#]]&]

A357707 Numbers whose prime indices have equal number of parts congruent to each of 1 and 3 (mod 4).

Original entry on oeis.org

1, 3, 7, 9, 10, 13, 19, 21, 27, 29, 30, 34, 37, 39, 43, 49, 53, 55, 57, 61, 62, 63, 70, 71, 79, 81, 87, 89, 90, 91, 94, 100, 101, 102, 107, 111, 113, 115, 117, 129, 130, 131, 133, 134, 139, 147, 151, 159, 163, 165, 166, 169, 171, 173, 181, 183, 186, 187, 189
Offset: 1

Views

Author

Gus Wiseman, Oct 12 2022

Keywords

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.

Examples

			The terms together with their prime indices begin:
     1: {}
     3: {2}
     7: {4}
     9: {2,2}
    10: {1,3}
    13: {6}
    19: {8}
    21: {2,4}
    27: {2,2,2}
    29: {10}
    30: {1,2,3}
		

Crossrefs

These partitions are counted by A035544.
Includes A066207 = products of primes of even index.
The conjugate partitions are ranked by A357636, reverse A357632.
The conjugate reverse version is A357640 (aerated).
A056239 adds up prime indices, row sums of A112798.
A316524 gives alternating sum of prime indices, reverse A344616.
A344651 counts partitions by alternating sum, ordered A097805.
A357705 counts reversed partitions by skew-alternating sum, half A357704.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Count[primeMS[#],?(Mod[#,4]==1&)]==Count[primeMS[#],?(Mod[#,4]==3&)]&]
Showing 1-9 of 9 results.