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

A363532 Number of integer partitions of n with weighted alternating sum 0.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 2, 2, 0, 3, 3, 3, 5, 5, 10, 12, 7, 14, 25, 18, 22, 48, 48, 41, 67, 82, 89, 111, 140, 170, 220, 214, 264, 392, 386, 436, 623, 693, 756, 934, 1102, 1301, 1565, 1697, 2132, 2616, 2727, 3192, 4062, 4550, 5000, 6132, 7197, 8067, 9338, 10750, 12683
Offset: 0

Views

Author

Gus Wiseman, Jun 14 2023

Keywords

Comments

We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i-1) * i * y_i.

Examples

			The a(11) = 3 through a(15) = 12 partitions (A = 10):
  (33221)   (84)        (751)       (662)       (A5)
  (44111)   (6222)      (5332)      (4442)      (8322)
  (222221)  (7311)      (6421)      (5531)      (9411)
            (621111)    (532111)    (43331)     (722211)
            (51111111)  (42211111)  (54221)     (831111)
                                    (65111)     (3322221)
                                    (432221)    (3333111)
                                    (443111)    (4422111)
                                    (32222111)  (5511111)
                                    (33311111)  (22222221)
                                                (72111111)
                                                (6111111111)
		

Crossrefs

The unweighted version is A035363.
These partitions have ranks A363621.
The triangle for this rank statistic is A363623, reverse A363622.
The version for compositions is A363626.
A000041 counts integer partitions.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, reverse A318283.
A316524 gives alternating sum of prime indices, reverse A344616.
A363619 gives weighted alternating sum of prime indices, reverse A363620.
A363624 gives weighted alternating sum of Heinz partition, reverse A363625.

Programs

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

A363626 Number of integer compositions of n with weighted alternating sum 0.

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 2, 5, 7, 8, 14, 38, 64, 87, 174, 373, 649, 1069, 2051, 4091, 7453, 13276, 25260, 48990, 91378, 168890, 321661, 618323, 1169126, 2203649, 4211163, 8085240, 15421171, 29390131, 56382040, 108443047, 208077560, 399310778
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2023

Keywords

Comments

We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i-1) * i * y_i.

Examples

			The a(3) = 1 through a(10) = 14 compositions:
  (21)  (121)  .  (42)    (331)     (242)      (63)       (541)
                  (3111)  (1132)    (1331)     (153)      (2143)
                          (2221)    (11132)    (4122)     (3232)
                          (21121)   (12221)    (5211)     (4321)
                          (112111)  (23111)    (13122)    (15112)
                                    (121121)   (14211)    (31231)
                                    (1112111)  (411111)   (42121)
                                               (1311111)  (114112)
                                                          (212122)
                                                          (213211)
                                                          (311221)
                                                          (322111)
                                                          (3111121)
                                                          (21211111)
		

Crossrefs

The unweighted version is A138364, ranks A344619.
The version for partitions is A363532, ranks A363621.
A000041 counts integer partitions.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, reverse A318283.
A316524 gives alternating sum of prime indices, reverse A344616.
A363619 gives weighted alternating sum of prime indices, reverse A363620.
A363624 gives weighted alternating sum of Heinz partition, reverse A363625.

Programs

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

Extensions

Terms a(22) onward from Max Alekseyev, Sep 05 2023

A363619 Weighted alternating sum of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 12 2023

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.
We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i-1) i * y_i.

Examples

			The prime indices of 300 are {1,1,2,3,3}, with weighted alternating sum 1*1 - 2*1 + 3*2 - 4*3 + 5*3 = 8, so a(300) = 8.
		

Crossrefs

The non-alternating version is A304818, reverse A318283.
The unweighted version is A316524, reverse A344616.
The reverse version is A363620.
The triangle for this rank statistic is A363622, reverse A363623.
For partitions instead of multisets we have A363624, reverse A363625.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, zero-based A359678.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    altwtsum[y_]:=Sum[(-1)^(k-1)*k*y[[k]],{k,1,Length[y]}];
    Table[altwtsum[prix[n]],{n,100}]

A363620 Reverse-weighted alternating sum of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 13 2023

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.
We define the reverse-weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(k-i) i * y_{k-i+1}.

Examples

			The prime indices of 300 are {1,1,2,3,3}, with reverse-weighted alternating sum 1*3 - 2*3 + 3*2 - 4*1 + 5*1 = 4, so a(300) = 4.
		

Crossrefs

The reverse non-alternating version is A304818, row-sums of A359361.
The non-alternating version is A318283, row-sums of A358136.
The unweighted version is A344616, reverse A316524.
The reverse version is A363619.
Positions of zeros are A363621.
The triangle for this rank statistic is A363623, reverse A363622.
For partitions instead of multisets we have A363625, reverse A363624.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    revaltwtsum[y_]:=Sum[(-1)^(Length[y]-k)*k*y[[-k]],{k,1,Length[y]}];
    Table[revaltwtsum[prix[n]],{n,100}]

A363621 Positive integers whose prime indices have reverse-weighted alternating sum 0.

Original entry on oeis.org

1, 6, 21, 40, 50, 54, 65, 132, 133, 154, 210, 224, 319, 340, 351, 360, 374, 392, 450, 481, 486, 507, 546, 598, 624, 644, 731, 825, 855, 969, 1007, 1029, 1054, 1144, 1210, 1254, 1320, 1364, 1386, 1403, 1408, 1520, 1558, 1653, 1750, 1785, 1827, 1836, 1890, 1960
Offset: 1

Views

Author

Gus Wiseman, Jun 13 2023

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.
We define the reverse-weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(k-i) i * y_{k-i+1}.

Examples

			The prime indices of 360 are {1,1,1,2,2,3}, with reverse-weighted alternating sum 1*3 - 2*2 + 3*2 - 4*1 + 5*1 - 6*1 = 0, so 360 is in the sequence.
The terms together with their prime indices begin:
     1: {}
     6: {1,2}
    21: {2,4}
    40: {1,1,1,3}
    50: {1,3,3}
    54: {1,2,2,2}
    65: {3,6}
   132: {1,1,2,5}
   133: {4,8}
   154: {1,4,5}
   210: {1,2,3,4}
   224: {1,1,1,1,1,4}
   319: {5,10}
   340: {1,1,3,7}
   351: {2,2,2,6}
   360: {1,1,1,2,2,3}
		

Crossrefs

The unweighted version is A000290.
Partitions of this type are counted by A363532.
Positions of zeros in A363620 and A363624, reverse A363619 and A363625.
Compositions of this type are counted by A363626.
A053632 counts compositions by weighted sum.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices.
A318283 gives weighted sum of reversed prime indices.
A320387 counts multisets by weighted sum.
A344616 gives reverse-alternating sum of prime indices.
A363623 counts partitions by reverse-weighted alternating sum.

Programs

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

A363622 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with weighted alternating sum k (leading and trailing 0's omitted).

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 3, 0, 0, 2, 0, 1, 1, 2, 1, 1, 3, 0, 2, 2, 1, 1, 2, 2, 1, 1, 5, 0, 0, 3, 0, 2, 2, 2, 1, 3, 2, 1, 1, 5, 0, 3, 3, 2, 2, 3, 2, 2, 4, 2, 1, 1, 7, 0, 0, 5, 0, 3, 3, 4, 2, 4, 2, 4, 4, 2, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2023

Keywords

Comments

We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i-1) i * y_i. For example:
- (3,3,2,1,1) has weighted alternating sum 1*3 - 2*3 + 3*2 - 4*1 + 5*1 = 4.
- (1,2,2,3) has weighted alternating sum 1*1 - 2*2 + 3*2 - 4*3 = -9.

Examples

			Triangle begins:
  1
  1
  1  0  0  1
  1  0  1  1
  2  0  0  1  0  1  1
  2  0  1  1  1  1  1
  3  0  0  2  0  1  1  2  1  1
  3  0  2  2  1  1  2  2  1  1
  5  0  0  3  0  2  2  2  1  3  2  1  1
  5  0  3  3  2  2  3  2  2  4  2  1  1
  7  0  0  5  0  3  3  4  2  4  2  4  4  2  1  1
  7  0  5  5  3  3  5  4  3  5  3  5  4  2  1  1
Row n = 6 counts the following partitions:
  k=-3            k=0        k=2    k=3   k=4      k=5    k=6
  -----------------------------------------------------------
  (33)      .  .  (42)    .  (321)  (51)  (222)    (411)  (6)
  (2211)          (3111)                  (21111)
  (111111)
		

Crossrefs

Row sums are A000041.
The unweighted version is A103919 with leading zeros removed.
Row-lengths appear to be A168233.
Central column T(n,0) is A363532, ranks A363621.
The corresponding rank statistic is A363619, reverse A363620.
The reverse version is A363623.
A053632 counts compositions by weighted sum.
A264034 counts partitions by weighted sum, reverse A358194.
A316524 gives alternating sum of prime indices, reverse A344616.
A363624 gives weighted alternating sum of Heinz partition, reverse A363625.

Programs

  • Mathematica
    altwtsum[y_]:=Sum[(-1)^(k-1)*k*y[[k]],{k,1,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],altwtsum[#]==k&]],{n,0,15},{k,Min[altwtsum/@IntegerPartitions[n]], Max[altwtsum/@IntegerPartitions[n]]}]

A363623 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with reverse-weighted alternating sum k (leading and trailing 0's omitted).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 0, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 0, 3, 0, 1, 1, 1, 1, 3, 2, 0, 3, 1, 2, 0, 1, 0, 1, 2, 5, 1, 0, 3, 1, 2, 2, 2, 1, 1, 0, 1, 0, 1, 2, 5, 3, 0, 4, 2, 2, 0, 3, 2, 1, 3, 0, 0, 1, 0, 1, 1, 1, 1, 7, 2, 0, 4, 1, 5, 2, 3, 1, 3, 0, 2, 3, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2023

Keywords

Comments

We define the reverse-weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(k-i) i * y_{k-i+1}. For example:
- (3,3,2,1,1) has reverse-weighted alternating sum 1*1 - 2*1 + 3*2 - 4*3 + 5*3 = 8.
- (1,2,2,3) has reverse-weighted alternating sum -1*3 + 2*2 - 3*2 + 4*1 = -1.

Examples

			Triangle begins:
  1
  1
  1  1
  1  2
  2  0  1  2
  2  1  1  1  1  1
  3  1  0  3  0  1  1  1  1
  3  2  0  3  1  2  0  1  0  1  2
  5  1  0  3  1  2  2  2  1  1  0  1  0  1  2
  5  3  0  4  2  2  0  3  2  1  3  0  0  1  0  1  1  1  1
Row n = 6 counts the following partitions:
  k=3       k=4       k=6       k=8      k=9   k=10    k=11
--------------------------------------------------------------
  (33)      (222)  .  (6)    .  (21111)  (51)  (3111)  (411)
  (2211)              (42)
  (111111)            (321)
		

Crossrefs

Row sums are A000041.
Column k = floor((n+1)/2) is A119620.
The unweighted version is A344612 aerated, reverse A103919.
The corresponding rank statistic is A363620, reverse A363619.
The reverse version is A363622.
A053632 counts compositions by weighted sum.
A264034 counts partitions by weighted sum, reverse A358194.
A316524 gives alternating sum of prime indices, reverse A344616.
A363624 gives weighted alternating sum of Heinz partition, reverse A363625.

Programs

  • Mathematica
    revaltwtsum[y_]:=Sum[(-1)^(Length[y]-k)*k*y[[-k]],{k,1,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],revaltwtsum[#]==k&]],{n,0,15},{k,Floor[(n+1)/2],Ceiling[n*(n+1)/4]}]

A363624 Weighted alternating sum of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 13 2023

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.
We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i - 1) * i * y_i.

Examples

			The partition with Heinz number 600 is (3,3,2,1,1,1), with weighted alternating sum 1*3 - 2*3 + 3*2 - 4*1 + 5*1 - 6*1 = -2, so a(600) = -2.
		

Crossrefs

The non-alternating version is A318283, reverse A304818.
The unweighted version is A344616, reverse A316524.
For multisets instead of partitions we have A363619.
Positions of zeros are A363621, counted by A363532.
The triangle for this rank statistic is A363622, reverse A363623.
The reverse version is A363625, for multisets A363620.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, reverse A007294.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.
A363626 counts compositions with reverse-weighted alternating sum 0.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
    altwtsum[y_]:=Sum[(-1)^(k-1)*k*y[[k]],{k,1,Length[y]}];
    Table[altwtsum[Reverse[prix[n]]],{n,100}]
Showing 1-8 of 8 results.