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.

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

A359897 Number of strict integer partitions of n whose parts have the same mean as median.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 4, 4, 7, 6, 6, 10, 7, 10, 13, 11, 9, 20, 10, 20, 18, 21, 12, 30, 24, 28, 27, 30, 15, 73, 16, 37, 43, 45, 67, 74, 19, 55, 71, 126, 21, 150, 22, 75, 225, 78, 24, 183, 126, 245, 192, 132, 27, 284, 244, 403, 303, 120, 30, 828
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2023

Keywords

Examples

			The a(1) = 1 through a(9) = 7 partitions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)    (8)    (9)
            (2,1)  (3,1)  (3,2)  (4,2)    (4,3)  (5,3)  (5,4)
                          (4,1)  (5,1)    (5,2)  (6,2)  (6,3)
                                 (3,2,1)  (6,1)  (7,1)  (7,2)
                                                        (8,1)
                                                        (4,3,2)
                                                        (5,3,1)
		

Crossrefs

The non-strict version is A240219, complement A359894, ranked by A359889.
The complement is counted by A359898.
The odd-length case is A359899, complement A359900.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A237984 counts partitions containing their mean, complement A327472.
A240850 counts strict partitions containing their mean, complement A240851.
A325347 counts ptns with integer median, strict A359907, ranked by A359908.

Programs

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

A363719 Number of integer partitions of n satisfying (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 5, 2, 10, 2, 7, 7, 12, 2, 18, 2, 24, 16, 13, 2, 58, 15, 18, 37, 60, 2, 123, 2, 98, 79, 35, 103, 332, 2, 49, 166, 451, 2, 515, 2, 473, 738, 92, 2, 1561, 277, 839, 631, 1234, 2, 2043, 1560, 2867, 1156, 225, 2, 9020
Offset: 1

Views

Author

Gus Wiseman, Jun 19 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).
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.
Without loss of generality, we may assume there is a unique middle-part (A238478).
Includes all constant partitions.

Examples

			The a(n) partitions for n = 1, 2, 4, 6, 8, 12, 14, 16 (A..G = 10..16):
  1  2   4     6       8         C             E               G
     11  22    33      44        66            77              88
         1111  222     2222      444           2222222         4444
               111111  3221      3333          3222221         5443
                       11111111  4332          3322211         6442
                                 5331          4222211         7441
                                 222222        11111111111111  22222222
                                 322221                        32222221
                                 422211                        33222211
                                 111111111111                  42222211
                                                               52222111
                                                               1^16
		

Crossrefs

For unequal instead of equal: A363720, ranks A363730, unique mode A363725.
The odd-length case is A363721.
These partitions have ranks A363727, nonprime A363722.
The case of non-constant partitions is A363728, ranks A363729.
The version for factorizations is A363741, see A359909, A359910.
Just two statistics:
- (mean) = (median) gives A240219, also A359889, A359895, A359897, A359899.
- (mean) != (median) gives A359894, also A359890, A359896, A359898, A359900.
- (mean) = (mode) gives A363723, see A363724, A363731.
- (median) = (mode) gives A363740.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or negative mean), strict A008289.
A359893 and A359901 count partitions by median, odd-length A359902.
A362608 counts partitions with a unique mode.

Programs

  • Mathematica
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n], {Mean[#]}=={Median[#]}==modes[#]&]],{n,30}]

A363720 Number of integer partitions of n with different mean, median, and mode.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 3, 5, 7, 16, 17, 34, 38, 50, 79, 115, 123, 198, 220, 291, 399, 536, 605, 815, 1036, 1241, 1520, 2059, 2315, 3132, 3708, 4491, 5668, 6587, 7788, 10259, 12299, 14515, 17153, 21558, 24623, 30876, 35540, 41476, 52023, 61931, 70811, 85545
Offset: 0

Views

Author

Gus Wiseman, Jun 21 2023

Keywords

Comments

If there are multiple modes, then the mode is automatically considered different from the mean and median; otherwise, we take the unique mode.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(7) = 2 through a(11) = 16 partitions:
  (421)   (431)   (621)    (532)     (542)
  (3211)  (521)   (3321)   (541)     (632)
          (4211)  (4311)   (631)     (641)
                  (5211)   (721)     (731)
                  (32211)  (5311)    (821)
                           (6211)    (4322)
                           (322111)  (4421)
                                     (5321)
                                     (5411)
                                     (6311)
                                     (7211)
                                     (33221)
                                     (43211)
                                     (52211)
                                     (332111)
                                     (422111)
		

Crossrefs

For equal instead of unequal: A363719, ranks A363727, odd-length A363721.
The case of a unique mode is A363725.
These partitions have ranks A363730.
For factorizations we have A363742, for equal A363741, see A359909, A359910.
Just two statistics:
- (mean) = (median) gives A240219, also A359889, A359895, A359897, A359899.
- (mean) != (median) gives A359894, also A359890, A359896, A359898, A359900.
- (mean) = (mode) gives A363723, see A363724, A363731.
- (median) = (mode) gives A363740.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or negative mean), strict A008289.
A359893 and A359901 count partitions by median, odd-length A359902.
A362608 counts partitions with a unique mode.

Programs

  • Mathematica
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],{Mean[#]}!={Median[#]}!=modes[#]&]],{n,0,30}]

A359910 Number of odd-length integer factorizations of n into factors > 1 with the same mean as median.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3
Offset: 1

Views

Author

Gus Wiseman, Jan 24 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(n) factorizations for n = 120, 960, 5760, 6720:
  120      960         5760            6720
  4*5*6    2*16*30     16*18*20        4*30*56
  2*6*10   4*12*20     3*5*6*8*8       10*21*32
           8*10*12     4*4*6*6*10      12*20*28
           3*4*4*4*5   2*2*8*10*18     4*5*6*7*8
                       2*2*2*4*4*5*9   2*4*7*10*12
                                       2*2*2*4*5*6*7
		

Crossrefs

The version for partitions is A359895, ranked by A359891.
This is the odd-length case of A359909, partitions A240219.
A001055 counts factorizations.
A326622 counts factorizations with integer mean, strict A328966.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],OddQ[Length[#]]&&Mean[#]==Median[#]&]],{n,100}]
  • PARI
    A359910(n, m=n, facs=List([])) = if(1==n, (((#facs)%2) && (facs[(1+#facs)/2]==(vecsum(Vec(facs))/#facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A359910(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 20 2025

Extensions

More terms from Antti Karttunen, Jan 20 2025

A363741 Number of factorizations of n satisfying (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 26 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Position of first appearance of n is: (1, 2, 4, 16, 64, 5832, 4096, ...).

Examples

			The factorization 6*9*9*12 = 5832 has mean 9, median 9, and modes {9}, so it is counted under a(5832).
The a(n) factorizations for selected n:
2   4     16        64            5832              4096
    2*2   4*4       8*8           18*18*18          64*64
          2*2*2*2   4*4*4         6*9*9*12          8*8*8*8
                    2*2*2*2*2*2   3*6*6*6*9         16*16*16
                                  2*3*3*3*3*3*3*4   4*4*4*4*4*4
                                                    2*2*2*2*2*2*2*2*2*2*2*2
		

Crossrefs

For just (mean) = (median): A359909, see A240219, A359889, A359910, A359911.
The version for partitions is A363719, unequal A363720.
For unequal instead of equal we have A363742.
A000041 counts integer partitions.
A001055 counts factorizations, strict A045778, ordered A074206.
A089723 counts constant factorizations.
A316439 counts factorizations by length, A008284 partitions.
A326622 counts factorizations with integer mean, strict A328966.
A339846 counts even-length factorizations, A339890 odd-length.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[facs[n],{Mean[#]}=={Median[#]}==modes[#]&]],{n,100}]

A359911 Number of integer factorizations of n into factors > 1 without the same mean as median.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1, 0, 1, 1, 0, 0, 6, 0, 1, 0, 1, 0, 3, 0, 3, 0, 0, 0, 4, 0, 0, 1, 4, 0, 1, 0, 1, 0, 1, 0, 9, 0, 0, 1, 1, 0, 1, 0, 6, 1, 0, 0, 5, 0, 0, 0, 3, 0, 5, 0, 1, 0, 0, 0, 13, 0, 1, 1, 3, 0, 1, 0, 3, 0, 0, 0, 10
Offset: 1

Views

Author

Gus Wiseman, Jan 24 2023

Keywords

Examples

			The a(72) = 9 factorizations: (2*2*2*3*3), (2*2*2*9), (2*2*3*6), (2*2*18), (2*3*12), (2*4*9), (2*6*6), (3*3*8), (3*4*6).
		

Crossrefs

The version for partitions is A359894, complement A240219.
The complement is counted by A359909, odd-length A359910.
A001055 counts factorizations.
A326622 counts factorizations with integer mean, strict A328966.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Mean[#]!=Median[#]&]],{n,100}]
  • PARI
    median(lista) = if((#lista)%2, lista[(1+#lista)/2], (lista[#lista/2]+lista[1+(#lista/2)])/2);
    A359911(n, m=n, facs=List([])) = if(1==n, (#facs>0 && (median(facs)!=(vecsum(Vec(facs))/#facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A359911(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 20 2025

Formula

For n > 1, a(n) = A001055(n) - A359909(n). - Antti Karttunen, Jan 20 2025

Extensions

Data section extended to a(108) by Antti Karttunen, Jan 20 2025

A363742 Number of integer factorizations of n with different mean, median, and mode.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 27 2023

Keywords

Comments

An integer factorization of n is a multiset of positive integers > 1 with product n.
If there are multiple modes, then the mode is automatically considered different from the mean and median; otherwise, we take the unique mode.
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Position of first appearance of n is: 1, 30, 48, 60, 72, 200, 160, 96, ...

Examples

			The a(n) factorizations for n = 30, 48, 60, 72, 96, 144:
  (2*3*5)  (2*3*8)    (2*5*6)    (2*4*9)    (2*6*8)    (2*8*9)
           (2*2*3*4)  (2*3*10)   (3*4*6)    (3*4*8)    (3*6*8)
                      (2*2*3*5)  (2*3*12)   (2*3*16)   (2*3*24)
                                 (2*2*3*6)  (2*4*12)   (2*4*18)
                                            (2*2*3*8)  (2*6*12)
                                            (2*2*4*6)  (3*4*12)
                                            (2*3*4*4)  (2*2*4*9)
                                                       (2*3*4*6)
                                                       (2*2*3*12)
                                                       (2*2*3*3*4)
		

Crossrefs

Just (mean) != (median): A359911, complement A359909, partitions A359894.
The version for partitions is A363720, equal A363719, ranks A363730.
For equal instead of unequal we have A363741.
A001055 counts factorizations, strict A045778, ordered A074206.
A316439 counts factorizations by length, A008284 partitions.
A363265 counts factorizations with a unique mode.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[facs[n],{Mean[#]}!={Median[#]}!=modes[#]&]],{n,100}]
  • PARI
    median(lista) = if((#lista)%2, lista[(1+#lista)/2], (lista[#lista/2]+lista[1+(#lista/2)])/2);
    uniqmode(lista) = { my(freqs=Map(),v); for(i=1,#lista,if(!mapisdefined(freqs,lista[i],&v), v = 0); mapput(freqs,lista[i],1+v)); my(keys=Vec(freqs), fr, mc=0, mf=0, isuniq=0); for(i=1,#keys, fr = mapget(freqs,keys[i]); if(fr>=mf, isuniq = (fr>mf); mf = fr; mc = keys[i])); if(!isuniq, -1, mc); }; \\ Returns -1 if not unique mode.
    all_different(facs) = { my(mean=(vecsum(facs)/#facs), med=median(facs), mode=uniqmode(facs)); ((mean!=med) &&  (mean!=mode) && (med!=mode)); };
    A363742(n, m=n, facs=List([])) = if(1==n, (#facs>0 && all_different(Vec(facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A363742(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 29 2025

Extensions

More terms from Antti Karttunen, Jan 29 2025
Showing 1-9 of 9 results.