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.

A360672 Triangle read by rows where T(n,k) is the number of integer partitions of n whose left half (exclusive) sums to k, where k ranges from 0 to n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 3, 1, 0, 1, 0, 2, 3, 1, 0, 1, 0, 1, 4, 4, 1, 0, 1, 0, 0, 3, 6, 4, 1, 0, 1, 0, 0, 1, 7, 7, 5, 1, 0, 1, 0, 0, 1, 4, 8, 10, 5, 1, 0, 1, 0, 0, 0, 3, 6, 14, 11, 6, 1, 0, 1, 0, 0, 0, 1, 5, 12, 16, 14, 6, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 27 2023

Keywords

Comments

Also the number of integer partitions of n whose right half (inclusive) sums to n-k.

Examples

			Triangle begins:
  1
  1  0
  1  1  0
  1  1  1  0
  1  0  3  1  0
  1  0  2  3  1  0
  1  0  1  4  4  1  0
  1  0  0  3  6  4  1  0
  1  0  0  1  7  7  5  1  0
  1  0  0  1  4  8 10  5  1  0
  1  0  0  0  3  6 14 11  6  1  0
  1  0  0  0  1  5 12 16 14  6  1  0
  1  0  0  0  1  2 12 14 23 16  7  1  0
  1  0  0  0  0  2  7 13 24 27 19  7  1  0
  1  0  0  0  0  1  5  9 24 30 35 21  8  1  0
  1  0  0  0  0  1  3  7 17 31 42 40 25  8  1  0
  1  0  0  0  0  0  2  4 16 23 46 51 51 27  9  1  0
  1  0  0  0  0  0  1  3 10 21 37 57 69 57 31  9  1  0
  1  0  0  0  0  0  1  2  7 15 34 47 83 81 69 34 10  1  0
For example, row n = 9 counts the following partitions:
  (9)  .  .  (333)  (432)        (54)        (63)      (72)    (81)
                    (441)        (522)       (621)     (711)
                    (22221)      (531)       (3321)    (4311)
                    (111111111)  (3222)      (4221)    (5211)
                                 (32211)     (33111)   (6111)
                                 (2211111)   (42111)
                                 (3111111)   (51111)
                                 (21111111)  (222111)
                                             (321111)
                                             (411111)
For example, the partition y = (3,2,2,1,1) has left half (exclusive) (3,2), with sum 5, so y is counted under T(9,5).
		

Crossrefs

Row sums are A000041.
Column sums are A360673, inclusive A360671.
The central diagonal T(2n,n) is A360674, ranks A360953.
The left inclusive version is A360675 with rows reversed.
A008284 counts partitions by length.
A359893 and A359901 count partitions by median.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Take[#,Floor[Length[#]/2]]]==k&]],{n,0,10},{k,0,n}]

A238479 Number of partitions of n whose median is not a part.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 4, 5, 8, 10, 13, 18, 23, 30, 40, 50, 64, 83, 104, 131, 166, 206, 256, 320, 394, 485, 598, 730, 891, 1088, 1318, 1596, 1932, 2326, 2797, 3360, 4020, 4804, 5735, 6824, 8108, 9624, 11392, 13468, 15904, 18737, 22048, 25914, 30400, 35619, 41686
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

Also, the number of partitions p of n such that (1/2)*max(p) is a part of p.
Also the number of even-length integer partitions of n with distinct middle parts. For example, the partition (4,3,2,1) has middle parts {2,3} so is counted under a(10), but (3,2,2,1) has middle parts {2,2} so is not counted under a(8). - Gus Wiseman, May 13 2023

Examples

			a(6) counts these partitions:  51, 42, 2211 which all have an even number of parts, and their medians 3, 3 and 1.5 are not present. Note that the partitions 33 and 3111, although having an even number of parts, are not included in the count of a(6), but instead in that of A238478(6), as their medians, 3 for the former and 1 for the latter, are present in those partitions.
		

Crossrefs

The complement is A238478, ranks A362618.
For mean instead of median we have A327472, complement A237984.
These partitions have ranks A362617.
A000041 counts integer partitions, even-length A027187.
A325347 counts partitions with integer median, complement A307683.
A359893/A359901/A359902 count partitions by median.
A359908 ranks partitions with integer median, complement A359912.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; !MemberQ[p, Median[p]]], {n, 40}]
    (* also *)
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Max[p]/2]], {n, 50}]
  • PARI
    my(q='q+O('q^50)); concat([0,0], Vec(sum(n=1,17,q^(3*n)/prod(k=1,2*n,1-q^k)))) \\ David Radcliffe, Jun 25 2025
  • Python
    from sympy.utilities.iterables import partitions
    def A238479(n): return sum(1 for p in partitions(n) if (m:=max(p,default=0))&1^1 and m>>1 in p) # Chai Wah Wu, Sep 21 2023
    

Formula

a(n) = A000041(n) - A238478(n).
For all n, A027187(n) >= a(n). [Because when a partition of n has an odd number of parts, then it is not counted by this sequence (cf. A238478) and also some of the partitions with an even number of parts might be excluded here. Cf. Examples.] - Antti Karttunen, Feb 27 2014
From Jeremy Lovejoy, Sep 29 2022: (Start)
G.f.: Sum_{n>=1} q^(3*n)/Product_{k=1..2*n} (1-q^k).
a(n) ~ Pi/(2^(17/4)*3^(3/4)*n^(5/4))*exp(Pi*sqrt(2*n/3)). Proved by Blecher and Knopfmacher. (End)
a(n) = A087897(2*n) = A035294(n) - A078408(n-1). - Mathew Englander, May 20 2023

A238478 Number of partitions of n whose median is a part.

Original entry on oeis.org

1, 2, 2, 4, 5, 8, 11, 17, 22, 32, 43, 59, 78, 105, 136, 181, 233, 302, 386, 496, 626, 796, 999, 1255, 1564, 1951, 2412, 2988, 3674, 4516, 5524, 6753, 8211, 9984, 12086, 14617, 17617, 21211, 25450, 30514, 36475, 43550, 51869, 61707, 73230, 86821, 102706
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

Also the number of integer partitions of n with a unique middle part. This means that either the length is odd or the two middle parts are equal. For example, the partition (4,3,2,1) has middle parts {2,3} so is not counted under a(10), but (3,2,2,1) has middle parts {2,2} so is counted under a(8). - Gus Wiseman, May 13 2023

Examples

			a(6) counts these partitions:  6, 411, 33, 321, 3111, 222, 21111, 111111.
		

Crossrefs

For mean instead of median we have A237984, ranks A327473.
The complement is counted by A238479, ranks A362617.
These partitions have ranks A362618.
A000041 counts integer partitions.
A325347 counts partitions with integer median, complement A307683.
A359893/A359901/A359902 count partitions by median.
A359908 ranks partitions with integer median, complement A359912.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Median[p]]], {n, 40}]

Formula

a(n) + A238479(n) = A000041(n).
For all n, a(n) >= A027193(n) (because when a partition of n has an odd number of parts, its median is simply the part at the middle). - Antti Karttunen, Feb 27 2014
a(n) = A078408(n-1) - A282893(n). - Mathew Englander, May 24 2023

A360550 Numbers > 1 whose distinct prime indices have integer median.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 16, 17, 19, 20, 21, 22, 23, 25, 27, 29, 30, 31, 32, 34, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 50, 53, 55, 57, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 73, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 94, 97, 100
Offset: 1

Views

Author

Gus Wiseman, Feb 14 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. Distinct prime indices are listed by A304038.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime indices of 900 are {1,1,2,2,3,3}, with distinct parts {1,2,3}, with median 2, so 900 is in the sequence.
The prime indices of 330 are {1,2,3,5},  with distinct parts {1,2,3,5}, with median 5/2, so 330 is not in the sequence.
		

Crossrefs

For mean instead of median we have A326621.
Positions of even terms in A360457.
The complement (without 1) is A360551.
Partitions with these Heinz numbers are counted by A360686.
- For divisors (A063655) we have A139711, complement A139710.
- For prime indices (A360005) we have A359908, complement A359912.
- For distinct prime indices (A360457) we have A360550, complement A360551.
- For distinct prime factors (A360458) we have A360552, complement A100367.
- For prime factors (A360459) we have A359913, complement A072978.
- For prime multiplicities (A360460) we have A360553, complement A360554.
- For 0-prepended differences (A360555) we have A360556, complement A360557.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices, length A001221, sum A066328.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A326619/A326620 gives mean of distinct prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Select[Range[2,100],IntegerQ[Median[PrimePi/@First/@FactorInteger[#]]]&]

A360551 Numbers > 1 whose distinct prime indices have non-integer median.

Original entry on oeis.org

6, 12, 14, 15, 18, 24, 26, 28, 33, 35, 36, 38, 45, 48, 51, 52, 54, 56, 58, 65, 69, 72, 74, 75, 76, 77, 86, 93, 95, 96, 98, 99, 104, 106, 108, 112, 116, 119, 122, 123, 135, 141, 142, 143, 144, 145, 148, 152, 153, 158, 161, 162, 172, 175, 177, 178, 185, 192, 196
Offset: 1

Views

Author

Gus Wiseman, Feb 16 2023

Keywords

Comments

First differs from A325700 in having 330 and lacking 462.
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. Distinct prime indices are listed by A304038.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime indices of 900 are {1,1,2,2,3,3}, with distinct parts {1,2,3}, with median 2, so 900 is not in the sequence.
The prime indices of 462 are {1,2,4,5}, with distinct parts {1,2,4,5}, with median 3, so 462 is not in the sequence.
		

Crossrefs

For mean instead of median we have the complement of A326621.
Positions of odd terms in A360457.
The complement (without 1) is A360550, counted by A360686.
- For divisors (A063655) we have A139710, complement A139711.
- For prime indices (A360005) we have A359912, complement A359908.
- For distinct prime indices (A360457) we have A360551 complement A360550.
- For distinct prime factors (A360458) we have A100367, complement A360552.
- For prime factors (A360459) we have A072978, complement A359913.
- For prime multiplicities (A360460) we have A360554, complement A360553.
- For 0-prepended differences (A360555) we have A360557, complement A360556.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices, length A001221, sum A066328.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A326619/A326620 gives mean of distinct prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Select[Range[2,100],!IntegerQ[Median[PrimePi/@First/@FactorInteger[#]]]&]

A362558 Number of integer partitions of n without a nonempty initial consecutive subsequence summing to n/2.

Original entry on oeis.org

1, 1, 1, 3, 2, 7, 6, 15, 11, 30, 27, 56, 44, 101, 93, 176, 149, 297, 271, 490, 432, 792, 744, 1255, 1109, 1958, 1849, 3010, 2764, 4565, 4287, 6842, 6328, 10143, 9673, 14883, 13853, 21637, 20717, 31185, 29343, 44583, 42609, 63261, 60100, 89134, 85893, 124754
Offset: 0

Views

Author

Gus Wiseman, Apr 24 2023

Keywords

Comments

Also the number of n-multisets of positive integers that (1) have integer median, (2) cover an initial interval, and (3) have weakly decreasing multiplicities.

Examples

			The a(1) = 1 through a(7) = 15 partitions:
  (1)  (2)  (3)    (4)   (5)      (6)     (7)
            (21)   (31)  (32)     (42)    (43)
            (111)        (41)     (51)    (52)
                         (221)    (222)   (61)
                         (311)    (411)   (322)
                         (2111)   (2211)  (331)
                         (11111)          (421)
                                          (511)
                                          (2221)
                                          (3211)
                                          (4111)
                                          (22111)
                                          (31111)
                                          (211111)
                                          (1111111)
The partition y = (3,2,1,1,1) has nonempty initial consecutive subsequences (3,2,1,1,1), (3,2,1,1), (3,2,1), (3,2), (3), with sums 8, 7, 6, 5, 3. Since 4 is missing, y is counted under a(8).
		

Crossrefs

The odd bisection is A058695.
The version for compositions is A213173.
The complement is counted by A322439 aerated.
The even bisection is A362051.
For mean instead of median we have A362559.
A000041 counts integer partitions, strict A000009.
A325347 counts partitions with integer median, complement A307683.
A359893/A359901/A359902 count partitions by median.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MemberQ[Accumulate[#],n/2]&]],{n,0,15}]

A362618 Numbers whose prime factorization has either (1) odd length, or (2) equal middle parts.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 30, 31, 32, 37, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 61, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 88, 89, 90, 92, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Gus Wiseman, May 10 2023

Keywords

Comments

Also numbers n whose median prime factor is a prime factor of n.

Examples

			The prime factorization of 90 is 2*3*3*5, with middle parts (3,3), so 90 is in the sequence.
		

Crossrefs

Partitions of this type are counted by A238478.
The complement (without 1) is A362617, counted by A238479.
A027746 lists prime factors, A112798 indices, length A001222, sum A056239.
A359178 ranks partitions with a unique co-mode, counted by A362610.
A359893 counts partitions by median.
A359908 ranks partitions with integer median, counted by A325347.
A359912 ranks partitions with non-integer median, counted by A307683.
A362611 ranks modes in prime factorization, counted by A362614.
A362621 ranks partitions with median equal to maximum, counted by A053263.
A362622 ranks partitions whose maximum is a middle part, counted by A237824.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Select[Range[2,100],MemberQ[prifacs[#],Median[prifacs[#]]]&]

A362051 Number of integer partitions of 2n without a nonempty initial consecutive subsequence summing to n.

Original entry on oeis.org

1, 1, 2, 6, 11, 27, 44, 93, 149, 271, 432, 744, 1109, 1849, 2764, 4287, 6328, 9673, 13853, 20717, 29343, 42609, 60100, 85893, 118475, 167453, 230080, 318654, 433763, 595921, 800878, 1090189, 1456095, 1957032, 2600199, 3465459, 4558785, 6041381, 7908681
Offset: 0

Views

Author

Gus Wiseman, Apr 24 2023

Keywords

Comments

Even bisection of A362558.
a(0) = 1; a(n) = A000041(2n) - A322439(n). - Alois P. Heinz, Apr 27 2023

Examples

			The a(1) = 1 through a(4) = 11 partitions:
  (2)  (4)   (6)     (8)
       (31)  (42)    (53)
             (51)    (62)
             (222)   (71)
             (411)   (332)
             (2211)  (521)
                     (611)
                     (3221)
                     (3311)
                     (5111)
                     (32111)
The partition y = (3,2,1,1,1) has nonempty initial consecutive subsequences (3,2,1,1,1), (3,2,1,1), (3,2,1), (3,2), (3), with sums 8, 7, 6, 5, 3. Since 4 is missing, y is counted under a(4).
		

Crossrefs

The version for compositions is A000302, bisection of A213173.
The complement is counted by A322439.
Even bisection of A362558.
A000041 counts integer partitions, strict A000009.
A304442 counts partitions with all equal run-sums.
A325347 counts partitions with integer median, complement A307683.
A353836 counts partitions by number of distinct run-sums.
A359893/A359901/A359902 count partitions by median.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[2n],!MemberQ[Accumulate[#],n]&]],{n,0,15}]

A360689 Number of integer partitions of n whose distinct parts have non-integer median.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 8, 6, 13, 11, 21, 17, 34, 36, 55, 61, 97, 115, 162, 191, 270, 328, 427, 514, 666, 810, 1027, 1211, 1530, 1832, 2260, 2688, 3342, 3952, 4824, 5746, 7010, 8313, 10116, 11915, 14436, 17074, 20536, 24239, 29053, 34170, 40747, 47865, 56830, 66621
Offset: 1

Views

Author

Gus Wiseman, Feb 22 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(1) = 0 through a(9) = 13 partitions:
  .  .  (21)  (211)  (32)    (411)    (43)      (332)      (54)
                     (41)    (2211)   (52)      (611)      (63)
                     (221)   (21111)  (61)      (22211)    (72)
                     (2111)           (322)     (41111)    (81)
                                      (2221)    (221111)   (441)
                                      (4111)    (2111111)  (522)
                                      (22111)              (3222)
                                      (211111)             (6111)
                                                           (22221)
                                                           (222111)
                                                           (411111)
                                                           (2211111)
                                                           (21111111)
For example, the partition y = (5,3,3,2,1,1) has distinct parts {1,2,3,5}, with median 5/2, so y is counted under a(15).
		

Crossrefs

For not just distinct parts: A307683, complement A325347, ranks A359912.
These partitions have ranks A360551.
The complement is counted by A360686, strict A359907, ranks A360550.
For multiplicities instead of distinct parts we have A360690, ranks A360554.
A000041 counts integer partitions, strict A000009.
A116608 counts partitions by number of distinct parts.
A359893 and A359901 count partitions by median, odd-length A359902.
A360457 gives median of distinct prime indices (times 2).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!IntegerQ[Median[Union[#]]]&]],{n,30}]
Showing 1-9 of 9 results.