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

A307683 Number of partitions of n having a non-integer median.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 4, 1, 7, 5, 11, 8, 18, 17, 31, 28, 47, 51, 75, 81, 119, 134, 181, 206, 277, 323, 420, 488, 623, 737, 922, 1084, 1352, 1597, 1960, 2313, 2819, 3330, 4029, 4743, 5704, 6722, 8030, 9434, 11234, 13175, 15601, 18262, 21552, 25184, 29612, 34518
Offset: 1

Views

Author

Clark Kimberling, Apr 24 2019

Keywords

Comments

This sequence and A325347 partition the partition numbers, A000041.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). - Gus Wiseman, Mar 16 2023

Examples

			a(7) counts these 4 partitions: [6,1], [5,2], [4,3], [3,2,1,1].
		

Crossrefs

The complement is counted by A325347, strict A359907.
For mean instead of median we have A349156, strict A361391.
These partitions have ranks A359912, complement A359908.
The strict case is A360952.
A000041 counts integer partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean.
A359893/A359901/A359902 count partitions by median.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], q_ /; !IntegerQ[Median[q]]], {n, 10}]

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

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

A361850 Number of strict integer partitions of n such that the maximum is twice the median.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 1, 3, 3, 4, 2, 5, 4, 7, 8, 10, 6, 11, 11, 15, 16, 21, 18, 25, 23, 28, 32, 40, 40, 51, 51, 58, 60, 73, 75, 93, 97, 113, 123, 139, 141, 164, 175, 199, 217, 248, 263, 301, 320, 356, 383, 426, 450, 511, 551, 613, 664, 737
Offset: 1

Views

Author

Gus Wiseman, Apr 02 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(7) = 1 through a(20) = 4 strict partitions (A..C = 10..12):
  421  .  .  631  632   .  841   842  843   A51    A52    A53   A54   C62
                  5321     6421       7431  7432   8531   8532  C61   9542
                                      7521  64321  8621         9541  9632
                                                   65321        9631  85421
                                                                9721
The partition (7,4,3,1) has maximum 7 and median 7/2, so is counted under a(15).
The partition (8,6,2,1) has maximum 8 and median 4, so is counted under a(17).
		

Crossrefs

For minimum instead of median we have A241035, non-strict A237824.
For length instead of median we have A241087, non-strict A237755.
The non-strict version is A361849, ranks A361856.
The non-strict complement is counted by A361857, ranks A361867.
A000041 counts integer partitions, strict A000009.
A000975 counts subsets with integer median.
A008284 counts partitions by length, A058398 by mean.
A325347 counts partitions with integer median, complement A307683.
A359893 and A359901 count partitions by median, odd-length A359902.
A359907 counts strict partitions with integer median
A360005 gives median of prime indices (times two), distinct A360457.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Max@@#==2*Median[#]&]],{n,30}]

A361391 Number of strict integer partitions of n with non-integer mean.

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 4, 2, 4, 5, 11, 0, 17, 15, 13, 15, 37, 18, 53, 24, 48, 78, 103, 23, 111, 152, 143, 123, 255, 110, 339, 238, 372, 495, 377, 243, 759, 845, 873, 414, 1259, 842, 1609, 1383, 1225, 2281, 2589, 1285, 2827, 2518, 3904, 3836, 5119, 3715, 4630
Offset: 0

Views

Author

Gus Wiseman, Mar 11 2023

Keywords

Comments

Are 1, 2, 4, 6, 12 the only zeros?

Examples

			The a(3) = 1 through a(11) = 11 partitions:
  {2,1}  .  {3,2}  .  {4,3}    {4,3,1}  {5,4}  {5,3,2}    {6,5}
            {4,1}     {5,2}    {5,2,1}  {6,3}  {5,4,1}    {7,4}
                      {6,1}             {7,2}  {6,3,1}    {8,3}
                      {4,2,1}           {8,1}  {7,2,1}    {9,2}
                                               {4,3,2,1}  {10,1}
                                                          {5,4,2}
                                                          {6,3,2}
                                                          {6,4,1}
                                                          {7,3,1}
                                                          {8,2,1}
                                                          {5,3,2,1}
		

Crossrefs

The strict complement is counted by A102627.
The non-strict version is ranked by A348551, complement A316413.
The non-strict version is counted by A349156, complement A067538.
For median instead of mean we have A360952, complement A359907.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean.
A307683 counts partitions with non-integer median, ranks A359912.
A325347 counts partitions with integer median, ranks A359908.
A326567/A326568 give the mean of prime indices, conjugate A326839/A326840.
A327472 counts partitions not containing their mean, complement of A237984.
A327475 counts subsets with integer mean.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i, t) option remember; `if`(i*(i+1)/2Alois P. Heinz, Mar 16 2023
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!IntegerQ[Mean[#]]&]],{n,0,30}]

Extensions

a(31)-a(55) from Alois P. Heinz, Mar 16 2023

A361653 Number of even-length integer partitions of n with integer median.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 5, 3, 11, 7, 17, 16, 32, 31, 52, 55, 90, 99, 144, 167, 236, 273, 371, 442, 587, 696, 901, 1078, 1379, 1651, 2074, 2489, 3102, 3707, 4571, 5467, 6692, 7982, 9696, 11543, 13949, 16563, 19891, 23572, 28185, 33299, 39640, 46737, 55418, 65164
Offset: 0

Views

Author

Gus Wiseman, Mar 23 2023

Keywords

Comments

The median of an even-length multiset is the average of the two middle parts.
Because any odd-length partition has integer median, the odd-length version is counted by A027193, strict case A067659.

Examples

			The a(2) = 1 through a(9) = 7 partitions:
  (11)  .  (22)    (2111)  (33)      (2221)    (44)        (3222)
           (31)            (42)      (4111)    (53)        (4221)
           (1111)          (51)      (211111)  (62)        (4311)
                           (3111)              (71)        (6111)
                           (111111)            (2222)      (321111)
                                               (3221)      (411111)
                                               (3311)      (21111111)
                                               (5111)
                                               (221111)
                                               (311111)
                                               (11111111)
For example, the partition (4,3,1,1) has length 4 and median 2, so is counted under a(9).
		

Crossrefs

The odd-length version is counted by A027193, strict A067659.
Including odd-length partitions gives A307683, complement A325347.
For mean instead of median we have A361655, any length A067538.
A000041 counts integer partitions, strict A000009.
A000975 counts subsets with integer median, mean A051293.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], EvenQ[Length[#]]&&IntegerQ[Median[#]]&]],{n,0,30}]
Showing 1-7 of 7 results.