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

A359893 Triangle read by rows where T(n,k) is the number of integer partitions of n with median k, where k ranges from 1 to n in steps of 1/2.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 0, 1, 2, 0, 2, 0, 0, 0, 1, 3, 0, 1, 2, 0, 0, 0, 0, 1, 4, 1, 2, 0, 3, 0, 0, 0, 0, 0, 1, 6, 1, 3, 0, 1, 3, 0, 0, 0, 0, 0, 0, 1, 8, 1, 6, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 11, 2, 7, 1, 3, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 21 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

			Triangle begins:
  1
  1  0  1
  1  1  0  0  1
  2  0  2  0  0  0  1
  3  0  1  2  0  0  0  0  1
  4  1  2  0  3  0  0  0  0  0  1
  6  1  3  0  1  3  0  0  0  0  0  0  1
  8  1  6  0  2  0  4  0  0  0  0  0  0  0  1
 11  2  7  1  3  0  1  4  0  0  0  0  0  0  0  0  1
 15  2 10  3  4  0  2  0  5  0  0  0  0  0  0  0  0  0  1
 20  3 13  3  7  0  3  0  1  5  0  0  0  0  0  0  0  0  0  0  1
 26  4 19  3 11  1  4  0  2  0  6  0  0  0  0  0  0  0  0  0  0  0  1
For example, row n = 8 counts the following partitions:
  611       4211  422    .  332  .  44  .  .  .  .  .  .  .  8
  5111            521       431     53
  32111           2222              62
  41111           3221              71
  221111          3311
  311111          22211
  2111111
  11111111
		

Crossrefs

Row sums are A000041.
Row lengths are 2n-1 = A005408(n-1).
Column k=1 is A027336(n+1).
For mean instead of median we have A058398, see also A008284, A327482.
The mean statistic is ranked by A326567/A326568.
Omitting half-steps gives A359901.
The odd-length case is A359902.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts partitions w/ integer mean, strict A102627, ranked by A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Median[#]==k&]],{n,1,10},{k,1,n,1/2}]

A359901 Triangle read by rows where T(n,k) is the number of integer partitions of n with median k = 1..n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 2, 0, 1, 3, 1, 0, 0, 1, 4, 2, 3, 0, 0, 1, 6, 3, 1, 0, 0, 0, 1, 8, 6, 2, 4, 0, 0, 0, 1, 11, 7, 3, 1, 0, 0, 0, 0, 1, 15, 10, 4, 2, 5, 0, 0, 0, 0, 1, 20, 13, 7, 3, 1, 0, 0, 0, 0, 0, 1, 26, 19, 11, 4, 2, 6, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 21 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

			Triangle begins:
   1
   1  1
   1  0  1
   2  2  0  1
   3  1  0  0  1
   4  2  3  0  0  1
   6  3  1  0  0  0  1
   8  6  2  4  0  0  0  1
  11  7  3  1  0  0  0  0  1
  15 10  4  2  5  0  0  0  0  1
  20 13  7  3  1  0  0  0  0  0  1
  26 19 11  4  2  6  0  0  0  0  0  1
  35 24 14  5  3  1  0  0  0  0  0  0  1
  45 34 17  8  4  2  7  0  0  0  0  0  0  1
  58 42 23 12  5  3  1  0  0  0  0  0  0  0  1
For example, row n = 9 counts the following partitions:
  (7,1,1)              (5,2,2)      (3,3,3)  (4,4,1)  .  .  .  .  (9)
  (6,1,1,1)            (6,2,1)      (4,3,2)
  (3,3,1,1,1)          (3,2,2,2)    (5,3,1)
  (4,2,1,1,1)          (4,2,2,1)
  (5,1,1,1,1)          (4,3,1,1)
  (3,2,1,1,1,1)        (2,2,2,2,1)
  (4,1,1,1,1,1)        (3,2,2,1,1)
  (2,2,1,1,1,1,1)
  (3,1,1,1,1,1,1)
  (2,1,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1,1)
		

Crossrefs

Column k=1 is A027336(n+1).
For mean instead of median we have A058398, see also A008284, A327482.
Row sums are A325347.
The mean statistic is ranked by A326567/A326568.
Including half-steps gives A359893.
The odd-length case is A359902.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A000041 counts partitions, strict A000009.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts partitions w/ integer mean, strict A102627, ranks A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Median[#]==k&]],{n,15},{k,n}]

A237984 Number of partitions of n whose mean is a part.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 6, 5, 8, 2, 21, 2, 14, 22, 30, 2, 61, 2, 86, 67, 45, 2, 283, 66, 80, 197, 340, 2, 766, 2, 663, 543, 234, 703, 2532, 2, 388, 1395, 4029, 2, 4688, 2, 4476, 7032, 1005, 2, 17883, 2434, 9713, 7684, 14472, 2, 25348, 17562, 37829, 16786, 3721
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

a(n) = 2 if and only if n is a prime.

Examples

			a(6) counts these partitions:  6, 33, 321, 222, 111111.
From _Gus Wiseman_, Sep 14 2019: (Start)
The a(1) = 1 through a(10) = 8 partitions (A = 10):
  1  2   3    4     5      6       7        8         9          A
     11  111  22    11111  33      1111111  44        333        55
              1111         222              2222      432        22222
                           321              3221      531        32221
                           111111           4211      111111111  33211
                                            11111111             42211
                                                                 52111
                                                                 1111111111
(End)
		

Crossrefs

Cf. A238478.
The Heinz numbers of these partitions are A327473.
A similar sequence for subsets is A065795.
Dominated by A067538.
The strict case is A240850.
Partitions without their mean are A327472.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Mean[p]]], {n, 40}]
  • Python
    from sympy.utilities.iterables import partitions
    def A237984(n): return sum(1 for s,p in partitions(n,size=True) if not n%s and n//s in p) # Chai Wah Wu, Sep 21 2023

Formula

a(n) = A000041(n) - A327472(n). - Gus Wiseman, Sep 14 2019

A359902 Triangle read by rows where T(n,k) is the number of odd-length integer partitions of n with median k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 21 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

			Triangle begins:
  1
  0  1
  1  0  1
  1  0  0  1
  2  1  0  0  1
  2  2  0  0  0  1
  4  2  1  0  0  0  1
  4  3  2  0  0  0  0  1
  7  4  3  1  0  0  0  0  1
  8  6  3  2  0  0  0  0  0  1
 12  8  4  3  1  0  0  0  0  0  1
 14 11  5  4  2  0  0  0  0  0  0  1
 21 14  8  4  3  1  0  0  0  0  0  0  1
 24 20 10  5  4  2  0  0  0  0  0  0  0  1
 34 25 15  6  5  3  1  0  0  0  0  0  0  0  1
For example, row n = 9 counts the following partitions:
  (7,1,1)              (5,2,2)      (3,3,3)  (4,4,1)  .  .  .  .  (9)
  (3,3,1,1,1)          (6,2,1)      (4,3,2)
  (4,2,1,1,1)          (2,2,2,2,1)  (5,3,1)
  (5,1,1,1,1)          (3,2,2,1,1)
  (2,2,1,1,1,1,1)
  (3,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1,1)
		

Crossrefs

Column k=1 is A002865(n-1).
Row sums are A027193 (odd-length ptns), strict A067659.
This is the odd-length case of A359901, with half-steps A359893.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A000041 counts partitions, strict A000009.
A058398 counts partitions by mean, see also A008284, A327482.
A067538 counts partitions w/ integer mean, strict A102627, ranked by A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.
A325347 counts partitions w/ integer median, complement A307683.
A326567/A326568 gives mean of prime indices.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],OddQ[Length[#]]&&Median[#]==k&]],{n,15},{k,n}]

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

A359907 Number of strict integer partitions of n with integer median.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 4, 2, 6, 4, 9, 6, 14, 10, 18, 16, 27, 23, 36, 34, 51, 49, 67, 68, 94, 95, 122, 129, 166, 174, 217, 233, 287, 308, 371, 405, 487, 528, 622, 683, 805, 880, 1024, 1127, 1305, 1435, 1648, 1818, 2086, 2295, 2611, 2882, 3273, 3606, 4076, 4496, 5069
Offset: 0

Views

Author

Gus Wiseman, Jan 21 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) = 1 through a(14) = 18 partitions (A..E = 10..14):
  1  2  3  4   5  6    7    8    9    A    B    C     D     E
           31     42   421  53   432  64   542  75    643   86
                  51        62   531  73   632  84    652   95
                  321       71   621  82   641  93    742   A4
                            431       91   731  A2    751   B3
                            521       532  821  B1    832   C2
                                      541       543   841   D1
                                      631       642   931   653
                                      721       651   A21   743
                                                732   6421  752
                                                741         761
                                                831         842
                                                921         851
                                                5421        932
                                                            941
                                                            A31
                                                            B21
                                                            7421
		

Crossrefs

For mean instead of median: A102627, non-strict A067538 (ranked by A316413).
This is the strict case of A325347, ranked by A359908.
The median statistic is ranked by A360005(n)/2.
A000041 counts partitions, strict A000009.
A051293 counts subsets with integer mean, median A000975, cf. A005578.
A058398 counts partitions by mean, see also A008284, A327482.
A326567/A326568 gives the mean of prime indices.
A359893, A359901, A359902 count partitions by median.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&IntegerQ[Median[#]]&]],{n,0,30}]

A359889 Numbers that are 1 or whose prime indices have the same mean as median.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 67, 69, 71, 73, 74, 77, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Gus Wiseman, Jan 22 2023

Keywords

Comments

First differs from A236510 in having 252 (prime indices {1,1,2,2,4}).
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.
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 mean 2 and median 2, so 900 is in the sequence.
		

Crossrefs

These partitions are counted by A240219, strict A359897.
The LHS (mean of prime indices) is A326567/A326568.
The complement is A359890, counted by A359894.
The odd-length case is A359891, complement A359892, counted by A359895.
The RHS (median of prime indices) is A360005/2.
A058398 counts partitions by mean, see also A008284, A327482.
A088529/A088530 gives mean of prime signature A124010.
A112798 lists prime indices, length A001222, sum A056239.
A316413 lists numbers whose prime indices have integer mean.
A359893 and A359901 count partitions by median, odd-length A359902.
A359908 lists numbers whose prime indices have integer median.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],#==1||Mean[prix[#]]==Median[prix[#]]&]

Formula

Numbers n such that A326567(n)/A326568(n) = A360005(n)/2.

A359894 Number of integer partitions of n whose parts do not have the same mean as median.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 3, 10, 13, 20, 28, 49, 53, 93, 113, 145, 203, 287, 329, 479, 556, 724, 955, 1242, 1432, 1889, 2370, 2863, 3502, 4549, 5237, 6825, 8108, 9839, 12188, 14374, 16958, 21617, 25852, 30582, 36100, 44561, 51462, 63238, 73386, 85990, 105272, 124729
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2023

Keywords

Examples

			The a(4) = 1 through a(8) = 13 partitions:
  (211)  (221)   (411)    (322)     (332)
         (311)   (3111)   (331)     (422)
         (2111)  (21111)  (421)     (431)
                          (511)     (521)
                          (2221)    (611)
                          (3211)    (4211)
                          (4111)    (5111)
                          (22111)   (22211)
                          (31111)   (32111)
                          (211111)  (41111)
                                    (221111)
                                    (311111)
                                    (2111111)
		

Crossrefs

The complement is counted by A240219.
These partitions are ranked by A359890, complement A359889.
The odd-length case is ranked by A359892, complement A359891.
The odd-length case is A359896, complement A359895.
The strict case is A359898, complement A359897.
The odd-length strict case is A359900, complement A359899.
A000041 counts partitions, strict A000009.
A008284 and A058398 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts ptns with integer mean, strict A102627, ranked by A316413.
A237984 counts ptns containing their mean, strict A240850, ranked by A327473.
A325347 counts ptns with integer median, strict A359907, ranked by A359908.
A326622 counts factorizations with integer mean, strict A328966.
A359893 and A359901 count partitions by median, odd-length A359902.
A359909 counts factorizations with the same mean as median, odd-len A359910.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Mean[#]!=Median[#]&]],{n,0,30}]

A360068 Number of integer partitions of n such that the parts have the same mean as the multiplicities.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 6, 0, 0, 0, 6, 0, 7, 0, 1, 0, 0, 0, 0, 90, 0, 63, 0, 0, 0, 0, 11, 0, 0, 0, 436, 0, 0, 0, 0, 0, 0, 0, 0, 2157, 0, 0, 240, 1595, 22, 0, 0, 0, 6464, 0, 0, 0, 0, 0, 0, 0, 0, 11628, 4361, 0, 0, 0, 0, 0, 0, 0, 12927, 0, 0, 621, 0
Offset: 0

Views

Author

Gus Wiseman, Jan 27 2023

Keywords

Comments

Note that such a partition cannot be strict for n > 1.
Conjecture: If n is squarefree, then a(n) = 0.

Examples

			The n = 1, 4, 8, 9, 12, 16, 18 partitions (D=13):
  (1)  (22)  (3311)  (333)  (322221)  (4444)      (444222)
             (5111)         (332211)  (43222111)  (444411)
                            (422211)  (43321111)  (552222)
                            (522111)  (53221111)  (555111)
                            (531111)  (54211111)  (771111)
                            (621111)  (63211111)  (822222)
                                                  (D11111)
For example, the partition (4,3,3,3,3,3,2,2,1,1) has mean 5/2, and its multiplicities (1,5,2,2) also have mean 5/2, so it is counted under a(20).
		

Crossrefs

These partitions are ranked by A359903, for prime factors A359904.
Positions of positive terms are A360070.
A000041 counts partitions, strict A000009.
A058398 counts partitions by mean, see also A008284, A327482.
A088529/A088530 gives mean of prime signature (A124010).
A326567/A326568 gives mean of prime indices (A112798).
A360069 counts partitions whose multiplicities have integer mean.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Mean[#]==Mean[Length/@Split[#]]&]],{n,0,30}]

A327481 Triangle read by rows where T(n,k) is the number of nonempty subsets of {1..n} with mean k.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 7, 3, 1, 1, 3, 9, 9, 3, 1, 1, 3, 9, 19, 9, 3, 1, 1, 3, 9, 25, 25, 9, 3, 1, 1, 3, 9, 29, 51, 29, 9, 3, 1, 1, 3, 9, 31, 75, 75, 31, 9, 3, 1, 1, 3, 9, 31, 93, 151, 93, 31, 9, 3, 1, 1, 3, 9, 31, 105, 235, 235, 105, 31, 9, 3, 1
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Comments

All terms are odd.

Examples

			Triangle begins:
                         1
                       1   1
                     1   3   1
                   1   3   3   1
                 1   3   7   3   1
               1   3   9   9   3   1
             1   3   9  19   9   3   1
           1   3   9  25  25   9   3   1
         1   3   9  29  51  29   9   3   1
       1   3   9  31  75  75  31   9   3   1
     1   3   9  31  93 151  93  31   9   3   1
   1   3   9  31 105 235 235 105  31   9   3   1
The subsets counted in row n = 5:
  {1}  {2}      {3}          {4}      {5}
       {1,3}    {1,5}        {3,5}
       {1,2,3}  {2,4}        {3,4,5}
                {1,3,5}
                {2,3,4}
                {1,2,4,5}
                {1,2,3,4,5}
		

Crossrefs

Row sums are A051293.
The sequence of rows converges to A066571.
The version for partitions is A327482.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Mean[#]==k&]],{n,10},{k,n}]
Showing 1-10 of 75 results. Next