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 13 results. Next

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}]

A357629 Half-alternating sum of the prime indices of n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 0, 6, 5, 5, 0, 7, 1, 8, -1, 6, 6, 9, -1, 6, 7, 2, -2, 10, 0, 11, 1, 7, 8, 7, -2, 12, 9, 8, -2, 13, -1, 14, -3, 1, 10, 15, 2, 8, 1, 9, -4, 16, -1, 8, -3, 10, 11, 17, -3, 18, 12, 0, 2, 9, -2, 19, -5, 11, 0, 20, 1, 21, 13, 2, -6
Offset: 1

Views

Author

Gus Wiseman, Oct 08 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 - ...
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 prime indices of 525 are {2,3,3,4} so a(525) = 2 + 3 - 3 - 4 = -2.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The version for standard compositions is A357621, reverse A357622.
The skew-alternating form is A357630, reverse A357634.
Positions of zeros are A357631, reverse A357635.
The reverse version is A357633.
These partitions are counted by A357637, skew A357638.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[halfats[primeMS[n]],{n,30}]

A357631 Numbers k such that the half-alternating sum of the prime indices of k is 0.

Original entry on oeis.org

1, 12, 16, 30, 63, 70, 81, 108, 154, 165, 192, 256, 273, 286, 300, 325, 442, 480, 561, 588, 595, 625, 646, 700, 741, 750, 874, 931, 972, 1008, 1045, 1080, 1120, 1173, 1296, 1334, 1452, 1470, 1495, 1540, 1653, 1728, 1771, 1798, 2028, 2139, 2294, 2401, 2430
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 - ...
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.
If k is a term, then so is m^4 * k for any m >= 1. - Robert Israel, Oct 10 2023

Examples

			The terms together with their prime indices begin:
    1: {}
   12: {1,1,2}
   16: {1,1,1,1}
   30: {1,2,3}
   63: {2,2,4}
   70: {1,3,4}
   81: {2,2,2,2}
  108: {1,1,2,2,2}
  154: {1,4,5}
  165: {2,3,5}
  192: {1,1,1,1,1,1,2}
  256: {1,1,1,1,1,1,1,1}
  273: {2,4,6}
  286: {1,5,6}
  300: {1,1,2,3,3}
		

Crossrefs

The version for original alternating sum is A000290.
The version for standard compositions is A357625, reverse A357626.
Positions of zeros in A357629, reverse A357633.
The skew-alternating form is A357632, reverse A357636.
The reverse version is A357635.
These partitions are counted by A357639, skew A357640.
A056239 adds up prime indices, row sums of A112798.
A316524 gives alternating sum of prime indices, reverse A344616.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, even A357642.

Programs

  • Maple
    f:= proc(n) local F,Q,i;
    F:= sort(ifactors(n)[2],(s,t) -> s[1] numtheory:-pi(t[1])$t[2],F);
    Q:= [-1,1,1,-1];
    add(Q[i mod 4 + 1]*F[i],i=1..nops(F))
    end proc:
    select(f=0, [$1..10000]); # Robert Israel, Oct 10 2023
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Select[Range[1000],halfats[primeMS[#]]==0&]

A357630 Skew-alternating sum of the prime indices of n.

Original entry on oeis.org

0, 1, 2, 0, 3, -1, 4, -1, 0, -2, 5, -2, 6, -3, -1, 0, 7, -3, 8, -3, -2, -4, 9, 1, 0, -5, -2, -4, 10, -4, 11, 1, -3, -6, -1, 0, 12, -7, -4, 2, 13, -5, 14, -5, -3, -8, 15, 2, 0, -5, -5, -6, 16, -1, -2, 3, -6, -9, 17, 1, 18, -10, -4, 0, -3, -6, 19, -7, -7, -6, 20
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 + ....
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 prime indices of 525 are {2,3,3,4} so a(525) = 2 - 3 - 3 + 4 = 0.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The reverse version is A357634.
The half-alternating form is A357629, reverse A357633.
Positions of zeros are A357632, reverse A357636.
The version for standard compositions is A357623, reverse A357624.
These partitions are counted by A357638, half A357637.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[skats[primeMS[n]],{n,30}]

A357634 Skew-alternating sum of the partition having Heinz number n.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, -1, 0, 2, 5, 0, 6, 3, 1, 0, 7, -1, 8, 1, 2, 4, 9, 1, 0, 5, -2, 2, 10, 0, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 1, 14, 3, -1, 8, 15, 2, 0, -1, 5, 4, 16, -1, 2, 3, 6, 9, 17, 1, 18, 10, 0, 0, 3, 2, 19, 5, 7, 0, 20, 1, 21, 11, -2, 6, 1, 3, 22, 3
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 + ....
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.

Examples

			The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 - 3 - 3 + 2 = 0.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The non-reverse version is A357630.
The half-alternating form is A357633, non-reverse A357629.
Positions of zeros are A357636, non-reverse A357632.
The version for standard compositions is A357624, non-reverse A357623.
These partitions are counted by A357638, half A357637.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[skats[Reverse[primeMS[n]]],{n,30}]

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

A357632 Numbers k such that the skew-alternating sum of the prime indices of k is 0.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 90, 100, 121, 144, 169, 196, 210, 225, 256, 289, 324, 360, 361, 400, 441, 462, 484, 525, 529, 550, 576, 625, 676, 729, 784, 840, 841, 858, 900, 910, 961, 1024, 1089, 1155, 1156, 1225, 1296, 1326, 1369, 1440, 1444, 1521, 1600
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 + ....
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: {}
     4: {1,1}
     9: {2,2}
    16: {1,1,1,1}
    25: {3,3}
    36: {1,1,2,2}
    49: {4,4}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
    90: {1,2,2,3}
   100: {1,1,3,3}
   121: {5,5}
   144: {1,1,1,1,2,2}
		

Crossrefs

The version for original alternating sum is A000290.
The version for standard compositions is A357627, reverse A357628.
Positions of zeros in A357630, reverse A357634.
The half-alternating form is A357631, reverse A357635.
The reverse version is A357636.
These partitions are counted by A357640, half A357639.
A056239 adds up prime indices, row sums of A112798.
A316524 gives alternating sum of prime indices, reverse A344616.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Select[Range[1000],skats[primeMS[#]]==0&]

A357633 Half-alternating sum of the partition having Heinz number n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 2, 6, 5, 5, 0, 7, 3, 8, 3, 6, 6, 9, 1, 6, 7, 2, 4, 10, 4, 11, 1, 7, 8, 7, 2, 12, 9, 8, 2, 13, 5, 14, 5, 3, 10, 15, 2, 8, 5, 9, 6, 16, 1, 8, 3, 10, 11, 17, 3, 18, 12, 4, 2, 9, 6, 19, 7, 11, 6, 20, 3, 21, 13, 4, 8, 9, 7, 22, 3, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 - ...
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.

Examples

			The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 + 3 - 3 - 2 = 2.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The version for standard compositions is A357622, non-reverse A357621.
The skew-alternating form is A357634, non-reverse A357630.
Positions of zeros are A000583, non-reverse A357631.
The reverse version is A357629.
These partitions are counted by A357637, skew A357638.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[halfats[Reverse[primeMS[n]]],{n,30}]

A357636 Numbers k such that the skew-alternating sum of the partition having Heinz number k is 0.

Original entry on oeis.org

1, 4, 9, 12, 16, 25, 30, 36, 49, 63, 64, 70, 81, 90, 100, 108, 121, 144, 154, 165, 169, 192, 196, 210, 225, 256, 273, 286, 289, 300, 324, 325, 360, 361, 400, 441, 442, 462, 480, 484, 525, 529, 550, 561, 576, 588, 595, 625, 646, 676, 700, 729, 741, 750, 784
Offset: 1

Views

Author

Gus Wiseman, Oct 09 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 + ....
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.

Examples

			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}
   49: {4,4}
   63: {2,2,4}
   64: {1,1,1,1,1,1}
   70: {1,3,4}
   81: {2,2,2,2}
   90: {1,2,2,3}
  100: {1,1,3,3}
  108: {1,1,2,2,2}
  121: {5,5}
  144: {1,1,1,1,2,2}
		

Crossrefs

The version for original alternating sum is A000290.
The half-alternating form is A000583, non-reverse A357631.
The version for standard compositions is A357628, non-reverse A357627.
The non-reverse version is A357632.
Positions of zeros in A357634, non-reverse A357630.
These partitions are counted by A357640, half A357639.
A056239 adds up prime indices, row sums of A112798.
A316524 gives alternating sum of prime indices, reverse A344616.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Select[Range[1000],skats[Reverse[primeMS[#]]]==0&]

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}]
Showing 1-10 of 13 results. Next