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.

Previous Showing 11-17 of 17 results.

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

A364062 Number of integer partitions of n with unique co-mode 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 3, 2, 3, 3, 6, 2, 8, 6, 9, 6, 16, 7, 21, 12, 23, 18, 39, 17, 47, 32, 59, 40, 86, 44, 110, 72, 131, 95, 188, 103, 233, 166, 288, 201, 389, 244, 490, 347, 587, 440, 794, 524, 974, 727, 1187, 903, 1547, 1106, 1908, 1459, 2303, 1826, 2979, 2198
Offset: 0

Views

Author

Gus Wiseman, Jul 12 2023

Keywords

Comments

These are partitions with at least one 1 but with fewer 1's than each of the other parts.
We define a co-mode in a multiset to be an element that appears at most as many times as each of the other elements. For example, the co-modes of {a,a,b,b,b,c,c} are {a,c}.

Examples

			The a(n) partitions for n = 5, 7, 11, 13, 15:
  (221)    (331)      (551)          (661)            (771)
  (11111)  (2221)     (33221)        (4441)           (44331)
           (1111111)  (33311)        (33331)          (55221)
                      (222221)       (44221)          (442221)
                      (2222111)      (332221)         (3322221)
                      (11111111111)  (2222221)        (3333111)
                                     (22222111)       (22222221)
                                     (1111111111111)  (222222111)
                                                      (111111111111111)
		

Crossrefs

For high (or unique) mode we have A241131, ranks A360013.
For low mode we have A241131, ranks A360015.
Allowing any unique co-mode gives A362610, ranks A359178.
These partitions have ranks A364061.
Adding all 1-free partitions gives A364159, ranks A364158.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length (or decreasing mean), strict A008289.
A237984 counts partitions containing their mean, ranks A327473.
A327472 counts partitions not containing their mean, ranks A327476.
A362608 counts partitions w/ unique mode, ranks A356862, complement A362605.
A362611 counts modes in prime indices, triangle A362614.
A362613 counts co-modes in prime indices, triangle A362615.
A363486 gives least mode in prime indices, A363487 greatest.

Programs

  • Mathematica
    comodes[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],comodes[#]=={1}&]],{n,0,30}]

A363721 Number of odd-length integer partitions of n satisfying (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 3, 2, 2, 2, 5, 7, 1, 2, 8, 2, 9, 16, 11, 2, 2, 15, 16, 37, 33, 2, 44, 2, 1, 79, 33, 103, 127, 2, 47, 166, 39, 2, 214, 2, 384, 738, 90, 2, 2, 277, 185, 631, 1077, 2, 1065, 1560, 477, 1156, 223, 2, 2863
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2023

Keywords

Comments

The median of an odd-length partition is the middle part.
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(n) partitions for n = {1, 3, 9, 14, 15, 18, 20, 22} (A..M = 10..22):
  1  3    9          E        F                I          K      M
     111  333        2222222  555              666        44444  22222222222
          111111111  3222221  33333            222222222  54443  32222222221
                     3322211  43332            322222221  64442  33222222211
                     4222211  53331            332222211  65441  33322222111
                              63321            422222211  74432  42222222211
                              111111111111111  432222111  74441  43222222111
                                               522222111  84431  44222221111
                                                          94421  52222222111
                                                                 53222221111
                                                                 62222221111
		

Crossrefs

All odd-length partitions are counted by A027193.
For just (mean) = (median) we have A359895, also A240219, A359899, A359910.
For just (mean) != (median) we have A359896, also A359894, A359900.
Allowing any length gives A363719, ranks A363727, non-constant A363728.
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.
A363726 counts odd-length partitions with a unique mode.

Programs

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

A363726 Number of odd-length integer partitions of n with a unique mode.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 7, 8, 12, 14, 22, 26, 39, 50, 67, 86, 118, 148, 196, 245, 315, 394, 507, 629, 792, 979, 1231, 1503, 1873, 2286, 2814, 3424, 4194, 5073, 6183, 7449, 9014, 10827, 13055, 15603, 18713, 22308, 26631, 31646, 37641, 44559, 52835, 62374, 73671
Offset: 0

Views

Author

Gus Wiseman, Jun 27 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}.

Examples

			The a(1) = 1 through a(8) = 8 partitions:
  (1)  (2)  (3)    (4)    (5)      (6)      (7)        (8)
            (111)  (211)  (221)    (222)    (322)      (332)
                          (311)    (411)    (331)      (422)
                          (11111)  (21111)  (511)      (611)
                                            (22111)    (22211)
                                            (31111)    (32111)
                                            (1111111)  (41111)
                                                       (2111111)
		

Crossrefs

The constant case is A001227.
Allowing multiple modes gives A027193, ranks A026424.
Allowing any length gives A362608, ranks A356862.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or decreasing mean), strict A008289.
A359893 and A359901 count partitions by median.

Programs

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

A362562 Number of non-constant integer partitions of n having a unique mode equal to the mean.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 4, 0, 3, 3, 7, 0, 12, 0, 18, 12, 9, 0, 52, 12, 14, 33, 54, 0, 121, 0, 98, 76, 31, 100, 343, 0, 45, 164, 493, 0, 548, 0, 483, 757, 88, 0, 1789, 289, 979, 645, 1290, 0, 2225, 1677, 3371, 1200, 221, 0, 10649
Offset: 0

Views

Author

Gus Wiseman, Jun 27 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}.

Examples

			The a(8) = 1 through a(16) = 7 partitions:
  (3221)  .  (32221)  .  (4332)    .  (3222221)  (43332)  (5443)
                         (5331)       (3322211)  (53331)  (6442)
                         (322221)     (4222211)  (63321)  (7441)
                         (422211)                         (32222221)
                                                          (33222211)
                                                          (42222211)
                                                          (52222111)
		

Crossrefs

Partitions containing their mean are counted by A237984, ranks A327473.
Partitions missing their mean are counted by A327472, ranks A327476.
Allowing constant partitions gives A363723.
Including median also gives A363728, ranks A363729.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or decreasing mean), strict A008289.
A359893 and A359901 count partitions by median.
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],!SameQ@@#&&{Mean[#]}==modes[#]&]],{n,0,30}]

A363722 Nonprime numbers whose prime indices satisfy (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 90, 121, 125, 128, 169, 243, 256, 270, 289, 343, 361, 512, 525, 529, 550, 625, 729, 756, 810, 841, 961, 1024, 1331, 1369, 1666, 1681, 1849, 1911, 1950, 2048, 2187, 2197, 2209, 2268, 2401, 2430, 2625, 2695, 2700, 2750, 2809
Offset: 1

Views

Author

Gus Wiseman, Jun 24 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.
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).

Examples

			The terms together with their prime indices begin:
     4: {1,1}
     8: {1,1,1}
     9: {2,2}
    16: {1,1,1,1}
    25: {3,3}
    27: {2,2,2}
    32: {1,1,1,1,1}
    49: {4,4}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
    90: {1,2,2,3}
   121: {5,5}
   125: {3,3,3}
   128: {1,1,1,1,1,1,1}
		

Crossrefs

These partitions are counted by A363719 - 1 for n > 0.
Including primes gives A363727, counted by A363719.
For prime powers instead of just primes we have A363729, counted by A363728.
For unequal instead of equal we have A363730, counted by A363720.
A112798 lists prime indices, length A001222, sum A056239.
A326567/A326568 gives mean of prime indices.
A356862 ranks partitions with a unique mode, counted by A362608.
A359178 ranks partitions with multiple modes, counted by A362610.
A360005 gives twice the median of prime indices.
A362611 counts modes in prime indices, triangle A362614.
A362613 counts co-modes in prime indices, triangle A362615.
A363486 gives least mode in prime indices, A363487 greatest.
Just two statistics:
- (mean) = (median): A359889, counted by A240219.
- (mean) != (median): A359890, counted by A359894.
- (mean) = (mode): counted by A363723, see A363724, A363731.
- (median) = (mode): counted by A363740.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Select[Range[100],!PrimeQ[#]&&{Mean[prix[#]]}=={Median[prix[#]]}==modes[prix[#]]&]

Formula

Complement of A000040 in A363727.
Assuming there is a unique mode, we have A326567(a(n))/A326568(a(n)) = A360005(a(n))/2 = A363486(a(n)) = A363487(a(n)).

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
Previous Showing 11-17 of 17 results.