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 10 results.

A222969 Table T(n,k) is the number of n X (k+1) 0..1 arrays with every row least squares fitting to a positive-slope straight line and every column least squares fitting to a zero- or positive-slope straight line, with a single point array taken as having zero slope, read by downward antidiagonals.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 12, 16, 6, 1, 28, 48, 96, 10, 1, 54, 185, 576, 314, 20, 1, 119, 534, 5180, 3140, 1884, 36, 1, 230, 1873, 28836, 53292, 37680, 7344, 74, 1, 488, 5397, 222887, 487830, 1492176, 264384, 46512, 137, 1, 948, 17853, 1241310, 6811479, 26342820
Offset: 1

Views

Author

R. H. Hardin, Mar 10 2013

Keywords

Comments

Table starts
1 2 6 12 28 54 119
1 3 16 48 185 534 1873
1 6 96 576 5180 28836 222887
1 10 314 3140 53292 487830 6811479
1 20 1884 37680 1492176 26342820 810566001
1 36 7344 264384 21852384 677339136 41252032201
1 74 46512 3441888 687269268 41972251734 5815321906009
1 137 199912 27387944 11877013537 1306606331404 370184972397123
1 282 1281096 361269072 379255412732 82298403509112
1 536 6018524 3225928864 7601814965106
1 1100 38837844 42721628400
1 2117 192182076

Examples

			Some solutions for n=3, k=4:
  0 0 1 1 1     0 0 1 1 1     0 1 0 1 1     0 0 0 1 1
  0 1 1 1 1     0 0 0 0 1     0 0 0 0 1     0 1 0 1 1
  0 0 1 1 1     0 0 1 1 1     0 1 0 1 1     1 0 0 1 1
		

Crossrefs

Column 2 is A222855.
Row 2 is A222843.

A222970 Number of 1 X (n+1) 0..1 arrays with every row least squares fitting to a positive-slope straight line and every column least squares fitting to a zero- or positive-slope straight line, with a single point array taken as having zero slope.

Original entry on oeis.org

1, 2, 6, 12, 28, 54, 119, 230, 488, 948, 1979, 3860, 7978, 15624, 32072, 63014, 128746, 253588, 516346, 1019072, 2069590, 4091174, 8291746, 16412668, 33210428, 65808044, 132985161, 263755984, 532421062, 1056789662, 2131312530, 4233176854
Offset: 1

Views

Author

R. H. Hardin, Mar 10 2013

Keywords

Comments

From Gus Wiseman, Jun 16 2023: (Start)
Also appears to be the number of integer compositions of n + 2 with weighted sum greater than reverse-weighted sum, where the weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i * y_i, and the reverse is Sum_{i=1..k} i * y_{k-i+1}. The a(1) = 1 through a(4) = 12 compositions are:
(21) (31) (32) (42)
(211) (41) (51)
(221) (231)
(311) (312)
(1211) (321)
(2111) (411)
(1311)
(2121)
(2211)
(3111)
(12111)
(21111)
The version for partitions is A144300, strict A111133.
(End)

Examples

			Some solutions for n=3:
  0 1 0 1    0 1 1 1    0 0 1 0    0 0 1 1    0 0 0 1
		

Crossrefs

For >= instead of > we have A222855.
The case of equality is A222955.
Row 1 of A222969.
A053632 counts compositions by weighted sum (or reverse-weighted sum).
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, reverse A318283.

A231429 Number of partitions of 2n into distinct parts < n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 2, 4, 8, 14, 22, 35, 53, 78, 113, 160, 222, 306, 416, 558, 743, 980, 1281, 1665, 2149, 2755, 3514, 4458, 5626, 7070, 8846, 11020, 13680, 16920, 20852, 25618, 31375, 38309, 46649, 56651, 68616, 82908, 99940, 120192, 144238, 172730, 206425
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 14 2013

Keywords

Comments

From Gus Wiseman, Jun 17 2023: (Start)
Also the number of integer compositions of n with weighted sum 3*n, where the weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i * y_i. The a(0) = 1 through a(9) = 14 compositions are:
() . . . . (11111) (3111) (3211) (3311) (3411)
(11211) (11311) (4121) (4221)
(12121) (11411) (5112)
(21112) (12221) (11511)
(13112) (12321)
(21131) (13131)
(21212) (13212)
(111122) (21231)
(21312)
(22122)
(31113)
(111141)
(111222)
(112113)
For partitions we have A363527, ranks A363531. For reversed partitions we have A363526, ranks A363530.
(End)

Examples

			a(5) = #{4+3+2+1} = 1;
a(6) = #{5+4+3, 5+4+2+1} = 2;
a(7) = #{6+5+3, 6+5+2+1, 6+4+3+1, 5+4+3+2} = 4;
a(8) = #{7+6+3, 7+6+2+1, 7+6+3, 7+5+3+1, 7+4+3+2, 6+5+4+1, 6+5+3+2, 6+4+3+2+1} = 8;
a(9) = #{8+7+3, 8+7+2+1, 8+6+4, 8+6+3+1, 8+5+4+1, 8+5+3+2, 8+4+3+2+1, 7+6+5, 7+6+4+1, 7+6+3+2, 7+5+4+2, 7+5+3+2+1, 6+5+4+3, 6+5+4+2+1} = 14.
		

Crossrefs

A000041 counts integer partitions, strict A000009.
A053632 counts compositions by weighted sum.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Haskell
    a231429 n = p [1..n-1] (2*n) where
       p _  0 = 1
       p [] _ = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Total[Accumulate[#]]==3n&]],{n,0,15}] (* Gus Wiseman, Jun 17 2023 *)

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

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

A363526 Number of integer partitions of n with reverse-weighted sum 3*n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 4, 3, 2, 4, 4, 4, 5, 5, 4, 7, 7, 5, 8, 7, 6, 11, 9, 8, 11, 10, 10, 13, 12, 11, 15, 15, 12, 17, 16, 14, 20, 18, 16, 22, 20, 19, 24, 22, 20, 27, 26, 23, 29, 27, 25, 33, 30, 28, 35, 33, 31, 38, 36, 33, 41, 40
Offset: 0

Views

Author

Gus Wiseman, Jun 10 2023

Keywords

Comments

Are the partitions counted all of length 4 or 5?
The (one-based) weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i. The reverse-weighted sum is the weighted sum of the reverse, also the sum of partial sums. For example, the weighted sum of (4,2,2,1) is 1*4 + 2*2 + 3*2 + 4*1 = 18 and the reverse-weighted sum is 4*4 + 3*2 + 2*2 + 1*1 = 27.

Examples

			The partition (6,4,4,1) has sum 15 and reverse-weighted sum 45 so is counted under a(15).
The a(n) partitions for n = {5, 10, 15, 16, 21, 24}:
  (1,1,1,1,1)  (4,3,2,1)    (6,4,4,1)    (6,5,4,1)  (8,6,6,1)   (9,7,7,1)
               (2,2,2,2,2)  (6,5,2,2)    (6,6,2,2)  (8,7,4,2)   (9,8,5,2)
                            (7,3,3,2)    (7,4,3,2)  (9,5,5,2)   (9,9,3,3)
                            (3,3,3,3,3)             (9,6,3,3)   (10,6,6,2)
                                                    (10,4,4,3)  (10,7,4,3)
                                                                (11,5,5,3)
                                                                (12,4,4,4)
		

Crossrefs

Positions of terms with omega > 4 appear to be A079998.
The version for compositions is A231429.
The non-reverse version is A363527.
These partitions have ranks A363530, reverse A363531.
A000041 counts integer partitions, strict A000009.
A053632 counts compositions by weighted sum, rank statistic A029931/A359042.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, row-sums of A359361.
A318283 gives weighted sum of reversed prime indices, row-sums of A358136.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Total[Accumulate[#]]==3n&]],{n,0,30}]

A363527 Number of integer partitions of n with weighted sum 3*n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 3, 4, 4, 6, 8, 7, 10, 13, 13, 21, 25, 24, 37, 39, 40, 58, 63, 72, 94, 106, 118, 144, 165, 181, 224, 256, 277, 341, 387, 417, 504, 560, 615, 743, 818, 899, 1066, 1171, 1285, 1502, 1655, 1819, 2108, 2315, 2547, 2915
Offset: 0

Views

Author

Gus Wiseman, Jun 11 2023

Keywords

Comments

Are the partitions counted all of length > 4?
The (one-based) weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i. The reverse-weighted sum is the weighted sum of the reverse, also the sum of partial sums. For example, the weighted sum of (4,2,2,1) is 1*4 + 2*2 + 3*2 + 4*1 = 18 and the reverse-weighted sum is 4*4 + 3*2 + 2*2 + 1*1 = 27.

Examples

			The partition (2,2,1,1,1,1) has sum 8 and weighted sum 24 so is counted under a(8).
The a(13) = 1 through a(18) = 8 partitions:
  (332221)  (333221)    (33333)     (442222)    (443222)    (443331)
            (4322111)   (522222)    (5322211)   (4433111)   (444222)
            (71111111)  (4332111)   (55111111)  (5332211)   (533322)
                        (63111111)  (63211111)  (55211111)  (4443111)
                                                (63311111)  (7222221)
                                                (72221111)  (55311111)
                                                            (64221111)
                                                            (A11111111)
		

Crossrefs

The version for compositions is A231429.
The reverse version is A363526.
These partitions have ranks A363531.
A000041 counts integer partitions, strict A000009.
A053632 counts compositions by weighted sum, rank statistic A029931/A359042.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, row-sums of A359361.
A318283 gives weighted sum of reversed prime indices, row-sums of A358136.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Total[Accumulate[Reverse[#]]]==3n&]],{n,0,30}]

A363525 Number of integer partitions of n with weighted sum divisible by reverse-weighted sum.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 5, 5, 3, 10, 4, 7, 13, 10, 8, 29, 10, 18, 39, 20, 20, 70, 29, 40, 105, 65, 55, 166, 73, 132, 242, 141, 129, 476, 183, 248, 580, 487, 312, 984, 422, 868, 1345, 825, 724, 2709, 949, 1505, 2756, 2902, 1611, 4664, 2289, 4942, 5828, 4278
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2023

Keywords

Comments

The (one-based) weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i. This is also the sum of partial sums of the reverse.

Examples

			The partition (6,5,4,3,2,1,1,1,1) has weighted sum 80, reverse 160, so is counted under a(24).
The a(n) partitions for n = 1, 2, 4, 6, 9, 12, 14 (A..E = 10-14):
  1  2   4     6       9          C             E
     11  22    33      333        66            77
         1111  222     711        444           65111
               111111  6111       921           73211
                       111111111  3333          2222222
                                  7311          71111111
                                  63111         11111111111111
                                  222222
                                  621111
                                  111111111111
		

Crossrefs

The case of equality (and reciprocal version) is A000005.
The strict case is A363528.
A000041 counts integer partitions, strict A000009.
A053632 counts compositions by weighted sum, rank statistic A029931/A359042.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, row-sums of A359361.
A318283 gives weighted sum of reversed prime indices, row-sums of A358136.
A320387 counts multisets by weighted sum, zero-based A359678.
A363526 = partitions with weighted sum 3n, ranks A363530, reverse A363531.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Divisible[Total[Accumulate[#]], Total[Accumulate[Reverse[#]]]]&]],{n,30}]

A363528 Number of strict integer partitions of n with weighted sum divisible by reverse-weighted sum.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 2, 6, 2, 3, 9, 3, 4, 11, 4, 5, 16, 6, 8, 24, 8, 10, 31, 11, 14, 41, 18, 18, 59, 21, 27, 74, 30, 32, 100, 35, 43, 128, 54, 53, 173, 58, 78, 215, 81, 88, 294, 97, 123, 362, 150, 146, 469, 162, 221, 577
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2023

Keywords

Comments

The (one-based) weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i. This is also the sum of partial sums of the reverse.

Examples

			The a(n) partitions for n = 1, 12, 15, 21, 24, 26:
  (1)  (12)     (15)       (21)          (24)          (26)
       (9,2,1)  (11,3,1)   (15,5,1)      (17,6,1)      (11,8,4,2,1)
                (9,3,2,1)  (16,3,2)      (18,4,2)      (12,6,5,2,1)
                           (11,7,2,1)    (12,9,2,1)    (13,5,4,3,1)
                           (12,5,3,1)    (13,7,3,1)
                           (10,5,3,2,1)  (14,5,4,1)
                                         (15,4,3,2)
                                         (10,8,3,2,1)
                                         (11,6,4,2,1)
		

Crossrefs

The non-strict version is A363525.
A000041 counts integer partitions, strict A000009.
A264034 counts partitions by weighted sum, reverse A358194.
A304818 gives weighted sum of prime indices, row-sums of A359361.
A318283 gives weighted sum of reversed prime indices, row-sums of A358136.
A320387 counts multisets by weighted sum, zero-based A359678.
A363526 counts partitions with weighted sum 3n, reverse A363531.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Divisible[Total[Accumulate[#]],Total[Accumulate[Reverse[#]]]]&]],{n,30}]
Showing 1-10 of 10 results.